AngularJS 怎么在发送http请求的时候出现正在加载中的标识
2个回答
展开全部
var module = angular.module('testApp', [])
.controller('myC',function(){
$scope.ta = [1,2,3,4,5,6];
})
.directive('onFinishRender', function () {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
element.ready(function () {
$("#r_img").remove();
});
}
}
}
});
1
2
3
4
<div ng-app="testApp" ng-controller="myC">
<img id="r_img" src="xxxx/xx.jpg"/>
<p ng-repeat="t in ta" on-finish-render="test()">{{
.controller('myC',function(){
$scope.ta = [1,2,3,4,5,6];
})
.directive('onFinishRender', function () {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
element.ready(function () {
$("#r_img").remove();
});
}
}
}
});
1
2
3
4
<div ng-app="testApp" ng-controller="myC">
<img id="r_img" src="xxxx/xx.jpg"/>
<p ng-repeat="t in ta" on-finish-render="test()">{{
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询