mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-05 17:01:19 +08:00
docs($rootScope): use unshift to add items to the array at the beginning
Closes #7364
This commit is contained in:
committed by
Caitlin Potter
parent
517917f9fa
commit
a8aae48bc0
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* Loop operations are optimized by using while(count--) { ... }
|
||||
* - this means that in order to keep the same order of execution as addition we have to add
|
||||
* items to the array at the beginning (shift) instead of at the end (push)
|
||||
* items to the array at the beginning (unshift) instead of at the end (push)
|
||||
*
|
||||
* Child scopes are created and removed often
|
||||
* - Using an array would be slow since inserts in middle are expensive so we use linked list
|
||||
|
||||
Reference in New Issue
Block a user