From a8aae48bc06726e3aad5152e0b464cbf469eed2f Mon Sep 17 00:00:00 2001 From: barcahead Date: Tue, 6 May 2014 23:26:19 +0800 Subject: [PATCH] docs($rootScope): use unshift to add items to the array at the beginning Closes #7364 --- src/ng/rootScope.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index fec86749..76b8d08f 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -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