-------------------------------------转载:

遍历数组:
    <li ng-repeat="item in array">{{item}}</li>
遍历对象:
    key:对象的key
    value:对象的value
    <li ng-repeat="(key,value) in obj">{{key}} | {{value}}</li>

绑定$$haskKey:
    给每个item绑定唯一ID,当数组发生变化时,ID不变!
    <li ng-repeat="item in items track by $id(item)"></li>
过滤器:
    对item的每个属性进行模糊匹配
     <li ng-repeat="item in items |filter: 25"></li>
绑定属性过滤:
   对item的某个属性进行模糊匹配
    <li ng-repeat="item in items |filter: 25 track by item.age"></li>
保存匹配结果:
    把匹配到的结果另存到results数组变量,可供外部使用
    <li ng-repeat="item in items |filter: 25 as results"></li>
保存针对某个属性的过滤结果:
    <li ng-repeat="item in items |filter: 25 as results track by item.age "></li>

ng-repeat的用法:的更多相关文章

  1. MySQL中 while loop repeat 的用法

    -- MySQL中的三中循环 while . loop .repeat 求 1-n 的和 -- 第一种 while 循环 -- 求 1-n 的和 /* while循环语法: while 条件 DO 循 ...

  2. Part 6 AngularJS ng repeat directive

    ng-repeat is similar to foreach loop in C#. Let us understand this with an example. Here is what we ...

  3. 《JavaScript DOM编程艺术(第二版)》读书总结

    这本书是一本很基础的书,但对于刚入前端不久的我来说是一本不错的书,收获还是很大的,对一些基础的东西理解得更加透彻了. 1.DOM即document object model的缩写,文档对象模型,Jav ...

  4. table sorting–angularjs

    1: <script type="text/javascript" ng:autobind 2: src="http://code.angularjs.org/0. ...

  5. [译]用AngularJS构建大型ASP.NET单页应用(三)

    原文地址:http://www.codeproject.com/Articles/808213/Developing-a-Large-Scale-Application-with-a-Single A ...

  6. 快速入门 WePY 小程序【转】

    一.WePY介绍 WePY 是 腾讯 参考了Vue 等框架对原生小程序进行再次封装的框架,更贴近于 MVVM 架构模式, 并支持ES6/7的一些新特性. 二.WePY 使用 1.WePY的安装或更新都 ...

  7. 初步认识Angulajs

     Angulajs是一个MVC前段框架,项目中使用Angulajs必须按照框架的写法编写代码,可以统一代码规范易于后期代码的维护. M Model 模型-数据,V View 视图-表现层 HTML/C ...

  8. Pytorch版本yolov3源码阅读

    目录 Pytorch版本yolov3源码阅读 1. 阅读test.py 1.1 参数解读 1.2 data文件解析 1.3 cfg文件解析 1.4 根据cfg文件创建模块 1.5 YOLOLayer ...

  9. wepy_two

    2.代码高亮WebStorm/PhpStorm(其他工具参见:wepy官网代码高亮) (1)打开Settings,搜索Plugins,搜索Vue.js插件并安装. (2) 打开Settings,搜索F ...

  10. es6笔记 day2---字符串模板及字符串新增

    字符串连接案例 注意:引号变了,为键盘数字1旁边的飘花键 以前的老写法是在字符串中加入“+”号,给几个字符串给串起来,那种写法是要死人的. 现在只需加上一对``即可将字符串连接起来 --------- ...

随机推荐

  1. PC/FORTH 数字类型

    body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...

  2. python常用内建模块 collections,bs64,struct,hashlib,itertools,contextlib,xml

    #  2  collections 是Python内建的一个集合模块,提供了许多有用的集合类. # 2.1 namedtuple #tuple可以表示不变集合,例如,一个点的二维坐标就可以表示成: p ...

  3. 十六. Python基础(16)--内置函数-2

    十六. Python基础(16)--内置函数-2 1 ● 内置函数format() Convert a value to a "formatted" representation. ...

  4. xilinx 高速收发器Serdes深入研究-Comma码(转)

    一.为什么要用Serdes 传统的源同步传输,时钟和数据分离.在速率比较低时(<1000M),没有问题. 在速率越来越高时,这样会有问题 由于传输线的时延不一致和抖动存在,接收端不能正确的采样数 ...

  5. DOS debug 命令的详细用法

    DOS下的DEBUG命令的详细用法       2 推荐 名称 解释 格式 a (Assemble) 逐行汇编 a [address] c (Compare) 比较两内存块 c range addre ...

  6. NioEventLoop(netty 4.1)

    里面有个excecutor属性, 在loopgroup实例化loop的时候, 如果execute一个runnable的task的时候,检测loop启动了没有,没启动的话,执行excecutor的exe ...

  7. LINQ(数据库操作增、删、改及并发管理)

    本文将演示如何通过 Entity Framework 数据模型创建.修改.删除数据库记录. Customer cust = new Customer() { CustomerID = "LA ...

  8. MySQL:基础知识

    基础知识 一.软件的生命周期 软件定义 软件开发 软件使用与维护 二.数据(Data) 1.定义 描述客观事物特征或性质的某种符号,经过数字化处理存储在计算机 2.数据独立性 物理独立性:指用户的应用 ...

  9. 2016ICPC-大连 To begin or not to begin (简单思维)

    A box contains black balls and a single red ball. Alice and Bob draw balls from this box without rep ...

  10. HDU 6059 17多校3 Kanade's trio(字典树)

    Problem Description Give you an array A[1..n],you need to calculate how many tuples (i,j,k) satisfy ...