If during execution an item is added to an array that is rendered using ngRepeat
, does it redraw all items?
相关问题
- angularJS: ui-router equivalent to $location.searc
- Separate AngularJS Controllers Into Separate Files
- Angular ngAnimate not working first time on page l
- Ionic Spinner not showing up
- Upload file to Google Cloud Storage using AngularJ
相关文章
- Passing variable through URL with angular js
- Watch entire object (deep watch) with AngularJS
- Angular ng-if change span text
- Can ng-show directive be used with a delay
- AngularJS $routeParams vs $stateParams
- Multiple parameters in AngularJS $resource GET
- How to set class/style of accordion heading in Ang
- PUT to S3 with presigned url gives 403 error
Since Angular 1.2 we have the 'track by' option which will prevent the repeater from re-rendering all the items.
Example:
Check out this explanation : http://www.codelord.net/2014/04/15/improving-ng-repeat-performance-with-track-by/
Yes, all items are redrawn.
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.
More information: