道北吴彦祖 2017-01-15
一、ng-repeat
伪代码如下:
js:
elem.bind('click',function(){
$modal.open({
templateUrl : urlManager.$staticViewUrls.$getUrl( 'static/basis/html/ac/font-awesome' ),
backdrop : 'false',
controller : ['$scope', '$modalInstance', function($scope, $modalInstance) {
acResourceService.iconInfo().success( function(obj) { //调用service,实现后台处理的数据
var getIconinfo=JSON.parse(obj.moreData.data);//通过json处理后台数据
var icons=getIconinfo.icon;
var iconsBgcolor=getIconinfo.iconBgcolor;
$scope.icons=icons;
$scope.bgcolors=iconsBgcolor;
} );
html:
<div class="panel-body" style="height: 300px; width: 100%; overflow: auto;" data-platform-scroll="">
<i data-ng-repeat="icon in icons" class="{{icon.name}} {{icon.size}}"
data-ng-click="onclickIconViewOk('{{icon.name}} {{icon.fsize}}');" > 注意ng-reapt使用
</i >
</div>
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="icons/apple-touch-icon-114x114-precom