diff options
| author | Misko Hevery | 2011-03-23 09:33:29 -0700 | 
|---|---|---|
| committer | Vojta Jina | 2011-08-02 01:00:03 +0200 | 
| commit | 8f0dcbab804180828d6859b1340c86cf161209fb (patch) | |
| tree | d13d47d47a1889cb7c96a87cecacd2e25307d51c /docs/content/guide/dev_guide.scopes.ngdoc | |
| parent | 1f4b417184ce53af15474de065400f8a686430c5 (diff) | |
| download | angular.js-8f0dcbab804180828d6859b1340c86cf161209fb.tar.bz2 | |
feat(scope): new and improved scope implementation
- Speed improvements (about 4x on flush phase)
- Memory improvements (uses no function closures)
- Break $eval into $apply, $dispatch, $flush
- Introduced $watch and $observe
Breaks angular.equals() use === instead of ==
Breaks angular.scope() does not take parent as first argument
Breaks scope.$watch() takes scope as first argument
Breaks scope.$set(), scope.$get are removed
Breaks scope.$config is removed
Breaks $route.onChange callback has not "this" bounded
Diffstat (limited to 'docs/content/guide/dev_guide.scopes.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.scopes.ngdoc | 30 | 
1 files changed, 14 insertions, 16 deletions
diff --git a/docs/content/guide/dev_guide.scopes.ngdoc b/docs/content/guide/dev_guide.scopes.ngdoc index e9706e2f..6ebd5501 100644 --- a/docs/content/guide/dev_guide.scopes.ngdoc +++ b/docs/content/guide/dev_guide.scopes.ngdoc @@ -1,36 +1,34 @@  @workInProgress  @ngdoc overview -@name Developer Guide: Angular Scopes +@name Developer Guide: Scopes  @description -An angular scope is a JavaScript type defined by angular. Instances of this type are objects that -serve as the context within which all model and controller methods live and get evaluated. +An Angular scope is a JavaScript object with additional APIs useful for watching property changes, +Angular scope is the model in Model-View-Controller paradigm. Instances of scope serve as the +context within which all {@link dev_guide.expressions expressions} get evaluated. -Angular links scope objects to specific points in a compiled (processed) template. This linkage -provides the contexts in which angular creates data-bindings between the model and the view. You -can think of angular scope objects as the medium through which the model, view, and controller -communicate. +You can think of Angular scope objects as the medium through which the model, view, and controller +communicate. Scopes are linked during the compilation process with the view. This linkage provides +the contexts in which Angular creates data-bindings between the model and the view. -In addition to providing the context in which data is evaluated, angular scope objects watch for +In addition to providing the context in which data is evaluated, Angular scope objects watch for  model changes. The scope objects also notify all components interested in any model changes (for  example, functions registered through {@link api/angular.scope.$watch $watch}, bindings created by  {@link api/angular.directive.ng:bind ng:bind}, or HTML input elements). -Angular scope objects are responsible for: +Angular scope objects: -* Gluing the model, controller and view template together. -* Providing the mechanism to watch for model changes ({@link api/angular.scope.$watch}). -* Notifying interested components when the model changes ({@link api/angular.scope.$eval}). -* Providing the context in which all controller functions and angular expressions are evaluated. +* Link the model, controller and view template together. +* Provide the mechanism to watch for model changes ({@link api/angular.scope.$watch}). +* Notify interested components when the model changes ({@link api/angular.scope.$eval}). +* Provide the context in which expressions are evaluated.  ## Related Topics  * {@link dev_guide.scopes.understanding_scopes Understanding Scopes} -* {@link dev_guide.scopes.working_scopes Working With Scopes} -* {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes} -* {@link dev_guide.scopes.updating_scopes Updating Scopes} +* {@link dev_guide.scopes.internals Scopes Internals}  ## Related API  | 
