加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angular中的ng-repeat-start和ng-repeat-end的用法介绍

发布时间:2020-12-17 09:19:31 所属栏目:安全 来源:网络整理
导读:ng-repeat-start和ng-repeat-end是angular(1.2.X)的扩展,用于灵活的控制遍历 index部分 div class="item item-input-inset" ng-repeat-start ="item in accessoryImg" span class="input-label" ng-bind="i18n.accessory_label"/span !--附件-- button cl

ng-repeat-start和ng-repeat-end是angular(1.2.X)的扩展,用于灵活的控制遍历

index部分
<div class="item item-input-inset" ng-repeat-start="item in accessoryImg">

<span class="input-label" ng-bind="i18n.accessory_label"></span> <!--附件-->
    <button class="button button-outline button-calm button-center" ng-bind="i18n.upload_accessory_btn"
            ng-click="accessory.click(item)"></button>                           <!--上传附件-->
  </div>
  <!--图片显示区域-->
  <div ng-show="item.src" class="addImage border-none pos-relative padding" **ng-repeat-end** >
    <img  ng-src="{{item.src}}" >
    <i ng-click="accessory.deleteAccessory(item)" class="icon ion-ios-close-outline pos-absolute font30 assertive deleteImg"></i>
  </div>

js部分
angular.module("app").controller("launchCtrl",["$scope",
function ($scope) {

"use strict";

/*附件的内容*/
$scope.accessoryImg = [
  {
    text: i18n.accessory_label,// 附件
    src: "",type: "accessoryInfo"
  }
];

}]);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读