Skip to content

Commit c25343f

Browse files
Laurentpetebacondarwin
Laurent
authored andcommitted
docs(rootScope): Fix various typos
1 parent cc1e422 commit c25343f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ng/rootScope.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
/**
44
* DESIGN NOTES
55
*
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.
77
*
88
* The typical use of scope is to watch the expressions, which most of the time return the same
99
* value as last time so we optimize the operation.
1010
*
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
1313
* - Internal state needs to be stored on scope directly, which means that private state is
1414
* exposed as $$____ properties
1515
*
1616
* Loop operations are optimized by using while(count--) { ... }
1717
* - 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)
1919
*
2020
* 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
2222
*
2323
* There are few watches then a lot of observers. This is why you don't want the observer to be
2424
* implemented in the same way as watch. Watch requires return of initialization function which
@@ -40,7 +40,7 @@
4040
* @methodOf ng.$rootScopeProvider
4141
* @description
4242
*
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
4444
* assuming that the model is unstable.
4545
*
4646
* The current default is 10 iterations.
@@ -450,7 +450,7 @@ function $RootScopeProvider(){
450450
* @function
451451
*
452452
* @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.
454454
* Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the
455455
* `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} until no more listeners are
456456
* firing. This means that it is possible to get into an infinite loop. This function will throw
@@ -793,7 +793,7 @@ function $RootScopeProvider(){
793793
* Afterwards, the event traverses upwards toward the root scope and calls all registered
794794
* listeners along the way. The event will stop propagating if one of the listeners cancels it.
795795
*
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
797797
* onto the {@link ng.$exceptionHandler $exceptionHandler} service.
798798
*
799799
* @param {string} name Event name to emit.

0 commit comments

Comments
 (0)