Skip to content

Commit

Permalink
docs(rootScope): correct code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrowne authored and jamessharp committed Jan 18, 2013
1 parent 4f9f441 commit f484d3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ng/rootScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function $RootScopeProvider(){
expect(scope.greeting).toEqual(undefined);
scope.$watch('name', function() {
this.greeting = this.salutation + ' ' + this.name + '!';
scope.greeting = scope.salutation + ' ' + scope.name + '!';
}); // initialize the watch
expect(scope.greeting).toEqual(undefined);
Expand Down Expand Up @@ -252,7 +252,7 @@ function $RootScopeProvider(){
scope.counter = 0;
expect(scope.counter).toEqual(0);
scope.$watch('name', function(newValue, oldValue) { counter = counter + 1; });
scope.$watch('name', function(newValue, oldValue) { scope.counter = scope.counter + 1; });
expect(scope.counter).toEqual(0);
scope.$digest();
Expand Down Expand Up @@ -345,7 +345,7 @@ function $RootScopeProvider(){
expect(scope.counter).toEqual(0);
scope.$watch('name', function(newValue, oldValue) {
counter = counter + 1;
scope.counter = scope.counter + 1;
});
expect(scope.counter).toEqual(0);
Expand Down

0 comments on commit f484d3b

Please sign in to comment.