diff options
| author | Misko Hevery | 2011-11-12 15:23:30 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 20:31:19 -0800 |
| commit | e88dfb734a64aad4dbd402642816781b0e1725ec (patch) | |
| tree | 19fb3dde697d1dc3082be9550c76aa29a8c232a7 /test/widgetsSpec.js | |
| parent | 8d6dc0b9a7b3dbff5f8edb3217b60b0cc5b66be4 (diff) | |
| download | angular.js-e88dfb734a64aad4dbd402642816781b0e1725ec.tar.bz2 | |
refactor(injector): $injector is no longer a function.
- $injector('abc') -> $injector.get('abc');
- $injector(fn) -> $injector.invoke(null, fn);
Diffstat (limited to 'test/widgetsSpec.js')
| -rw-r--r-- | test/widgetsSpec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index 2bb7bac2..82aa4956 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -507,15 +507,15 @@ describe("widget", function() { it('should be possible to nest ng:view in ng:include', inject(function() { var injector = angular.injector('ng', 'ngMock'); - var myApp = injector('$rootScope'); - var $browser = injector('$browser'); + var myApp = injector.get('$rootScope'); + var $browser = injector.get('$browser'); $browser.xhr.expectGET('includePartial.html').respond('view: <ng:view></ng:view>'); - injector('$location').path('/foo'); + injector.get('$location').path('/foo'); - var $route = injector('$route'); + var $route = injector.get('$route'); $route.when('/foo', {controller: angular.noop, template: 'viewPartial.html'}); - var element = injector('$compile')( + var element = injector.get('$compile')( '<div>' + 'include: <ng:include src="\'includePartial.html\'"> </ng:include>' + '</div>')(myApp); |
