显示加载图标或装载使用angularjs进度条 [英] Display Loading Icon or Loading Progress Bar using angularjs

查看:981
本文介绍了显示加载图标或装载使用angularjs进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用angularjs显示加载图标或加载进度条。我的意思是这样这在jQuery的 $(机构)addClass(加载)使用; $(身体)。 removeClass移除(装载); ,我看到进度条的一些链接这是像YouTube加载酒吧,但我不希望像我想简单的进度条或加载iage或加载图标或装载酒吧,酒吧显示从一个模块移动到模块,选项卡的标签。是否有这解释清楚如何使用它的任何链接或功能。

How to display the loading Icon or loading Progress bar using angularjs. I mean something like this which used in jquery $("body").addClass("loading");, $("body").removeClass("loading");, I saw some links for progress bar which is of like youtube loading bar but i don't want like that I want simple progress bar or loading iage or loading icon or loading bar which show bar moving from module to module, tabs to tabs. Is there any link or function which explain clearly how to use it.

推荐答案

如果你不想自己实现它,下面是几个环节。

if you dont want to implement it yourself, below are few links.

角度微调或的角假微调

也阅读了本<一个href=\"http://lemon$c$c.net/2013/07/31/angularjs-found-great-solution-to-display-ajax-spinner-loading-widget/\">BLOG里面详细介绍了微调如何与angularjs工作

also read this BLOG which details how the spinner works with angularjs

修改按注释

app.directive("spinner", function(){
return: {
restrict: 'E',
scope: {enable:"="},
template: <div class="spinner" ng-show="enable"><img src="content/spinner.gif"></div>
}
});

我还没有测试code,但不会指示更加复杂比这...

i havent tested the code but directive wont be more complex than this...

这篇关于显示加载图标或装载使用angularjs进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆