From 8f0dcbab804180828d6859b1340c86cf161209fb Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 23 Mar 2011 09:33:29 -0700 Subject: 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 --- .../dev_guide.scopes.controlling_scopes.ngdoc | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc (limited to 'docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc') diff --git a/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc b/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc deleted file mode 100644 index cdbad444..00000000 --- a/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc +++ /dev/null @@ -1,39 +0,0 @@ -@workInProgress -@ngdoc overview -@name Developer Guide: Scopes: Applying Controllers to Scopes -@description - -When a controller function is applied to a scope, the scope is augmented with the behavior defined -in the controller. The end result is that the scope behaves as if it were the controller: - -
-var scope = angular.scope();
-scope.salutation = 'Hello';
-scope.name = 'World';
-
-expect(scope.greeting).toEqual(undefined);
-
-scope.$watch('name', function(){
-this.greeting = this.salutation + ' ' + this.name + '!';
-});
-
-expect(scope.greeting).toEqual('Hello World!');
-scope.name = 'Misko';
-// scope.$eval() will propagate the change to listeners
-expect(scope.greeting).toEqual('Hello World!');
-
-scope.$eval();
-expect(scope.greeting).toEqual('Hello Misko!');
-
- - -## Related Topics - -* {@link dev_guide.scopes Angular Scope Objects} -* {@link dev_guide.scopes.understanding_scopes Understanding Angular Scopes} -* {@link dev_guide.scopes.working_scopes Working With Angular Scopes} -* {@link dev_guide.scopes.updating_scopes Updating Angular Scopes} - -## Related API - -* {@link api/angular.scope Angular Scope API} -- cgit v1.2.3