|
3 | 3 | /** |
4 | 4 | * DESIGN NOTES |
5 | 5 | * |
6 | | - * The design decisions behind the scope ware heavily favored for speed and memory consumption. |
| 6 | + * The design decisions behind the scope are heavily favored for speed and memory consumption. |
7 | 7 | * |
8 | 8 | * The typical use of scope is to watch the expressions, which most of the time return the same |
9 | 9 | * value as last time so we optimize the operation. |
10 | 10 | * |
11 | | - * Closures construction is expensive from speed as well as memory: |
12 | | - * - no closures, instead ups prototypical inheritance for API |
| 11 | + * Closures construction is expensive in terms of speed as well as memory: |
| 12 | + * - No closures, instead ups prototypical inheritance for API |
13 | 13 | * - Internal state needs to be stored on scope directly, which means that private state is |
14 | 14 | * exposed as $$____ properties |
15 | 15 | * |
16 | 16 | * Loop operations are optimized by using while(count--) { ... } |
17 | 17 | * - this means that in order to keep the same order of execution as addition we have to add |
18 | | - * items to the array at the begging (shift) instead of at the end (push) |
| 18 | + * items to the array at the beginning (shift) instead of at the end (push) |
19 | 19 | * |
20 | 20 | * Child scopes are created and removed often |
21 | | - * - Using array would be slow since inserts in meddle are expensive so we use linked list |
| 21 | + * - Using an array would be slow since inserts in middle are expensive so we use linked list |
22 | 22 | * |
23 | 23 | * There are few watches then a lot of observers. This is why you don't want the observer to be |
24 | 24 | * implemented in the same way as watch. Watch requires return of initialization function which |
|
40 | 40 | * @methodOf ng.$rootScopeProvider |
41 | 41 | * @description |
42 | 42 | * |
43 | | - * Sets the number of digest iteration the scope should attempt to execute before giving up and |
| 43 | + * Sets the number of digest iterations the scope should attempt to execute before giving up and |
44 | 44 | * assuming that the model is unstable. |
45 | 45 | * |
46 | 46 | * The current default is 10 iterations. |
@@ -450,7 +450,7 @@ function $RootScopeProvider(){ |
450 | 450 | * @function |
451 | 451 | * |
452 | 452 | * @description |
453 | | - * Process all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and its children. |
| 453 | + * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and its children. |
454 | 454 | * Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the |
455 | 455 | * `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} until no more listeners are |
456 | 456 | * firing. This means that it is possible to get into an infinite loop. This function will throw |
@@ -793,7 +793,7 @@ function $RootScopeProvider(){ |
793 | 793 | * Afterwards, the event traverses upwards toward the root scope and calls all registered |
794 | 794 | * listeners along the way. The event will stop propagating if one of the listeners cancels it. |
795 | 795 | * |
796 | | - * Any exception emmited from the {@link ng.$rootScope.Scope#$on listeners} will be passed |
| 796 | + * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed |
797 | 797 | * onto the {@link ng.$exceptionHandler $exceptionHandler} service. |
798 | 798 | * |
799 | 799 | * @param {string} name Event name to emit. |
|
0 commit comments