diff options
Diffstat (limited to 'docs/angular.service.ngdoc')
| -rw-r--r-- | docs/angular.service.ngdoc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/angular.service.ngdoc b/docs/angular.service.ngdoc index a34142bb..4e4810f9 100644 --- a/docs/angular.service.ngdoc +++ b/docs/angular.service.ngdoc @@ -76,7 +76,7 @@ window alert. }; }, {$inject: ['$window']}); </pre> - + And here is a unit test for this service. We use Jasmine spy (mock) instead of real browser's alert. <pre> var mock, notify; @@ -85,7 +85,7 @@ beforeEach(function() { mock = {alert: jasmine.createSpy()}; notify = angular.service('notify')(mock); }); - + it('should not alert first two notifications', function() { notify('one'); notify('two'); @@ -134,7 +134,7 @@ function myController($loc, $log) { }; } // which services to inject ? -myController.$inject = ['$location', '$log']; +myController.$inject = ['$location', '$log']; </pre> @example @@ -149,13 +149,13 @@ myController.$inject = ['$location', '$log']; } }; }, {$inject: ['$window']}); - + function myController(notifyService) { this.callNotify = function(msg) { notifyService(msg); }; } - + myController.$inject = ['notify']; </script> |
