mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
Publish the application root element as $rootElement so that it can be injected to other services.
13 lines
312 B
JavaScript
13 lines
312 B
JavaScript
'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);
|
|
});
|
|
});
|