是否ngRepeat重新解析所有项目增加一个新的项目之后? [英] Does ngRepeat rerender all items after adding an new item?

查看:86
本文介绍了是否ngRepeat重新解析所有项目增加一个新的项目之后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在执行过程中的项目添加到使用ngRepeat呈现一个数组,它重绘的所有项目?

If during execution an item is added to an array that is rendered using ngRepeat, does it redraw all items ?

推荐答案

是,所有项目都重新绘制。

在实际上,这些项可以在其他时间重绘以及

In fact, the items may be redrawn at other times as well.

示例::当在父指令/模板的值被更新。在$摘要循环,角将评估范围的树,这将导致重绘受影响的子组件。

Example: When a value in a parent directive / template is updated. During the '$digest' loop, Angular will evaluate the scope tree and this will cause affected child components to be redrawn.

更多信息:

  • http://docs.angularjs.org/guide/concepts#runtime
  • http://docs.angularjs.org/api/ng.$rootScope.Scope#$digest

这篇关于是否ngRepeat重新解析所有项目增加一个新的项目之后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆