Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ca6c4b

Browse files
Laurentpetebacondarwin
Laurent
authored andcommitted
docs(rootScope): Fix various typos
1 parent cfea209 commit 3ca6c4b

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.
@@ -320,7 +320,7 @@ function $RootScopeProvider(){
320320
* @function
321321
*
322322
* @description
323-
* Process all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and its children.
323+
* Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and its children.
324324
* Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the
325325
* `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} until no more listeners are
326326
* firing. This means that it is possible to get into an infinite loop. This function will throw
@@ -662,7 +662,7 @@ function $RootScopeProvider(){
662662
* Afterwards, the event traverses upwards toward the root scope and calls all registered
663663
* listeners along the way. The event will stop propagating if one of the listeners cancels it.
664664
*
665-
* Any exception emmited from the {@link ng.$rootScope.Scope#$on listeners} will be passed
665+
* Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
666666
* onto the {@link ng.$exceptionHandler $exceptionHandler} service.
667667
*
668668
* @param {string} name Event name to emit.

0 commit comments

Comments
 (0)