feat($rootElement): added application root element

Publish the application root element as $rootElement
so that it can be injected to other services.
This commit is contained in:
Misko Hevery
2012-05-18 14:53:11 -07:00
parent 0a6e464a93
commit 85632cb44c
5 changed files with 47 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
'use strict';
describe('$rootElement', function() {
it('should publish the bootstrap element into $rootElement', function() {
var element = jqLite('<div></div>');
var injector = angular.bootstrap(element);
expect(injector.get('$rootElement')[0]).toBe(element[0]);
dealoc(element);
});
});