angularJS前端显示文件名是特定字符开头的多张图片
发布网友
发布时间:2022-05-02 02:45
我来回答
共1个回答
热心网友
时间:2022-04-23 05:10
var mole = angular.mole('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()">{{t}}</p>
</div>