mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(ngInclude): fire $includeContentLoaded on proper (child) scope
This commit is contained in:
@@ -60,9 +60,10 @@ describe('ng-include', function() {
|
||||
}));
|
||||
|
||||
|
||||
it('should fire $includeContentLoaded event after linking the content', inject(
|
||||
it('should fire $includeContentLoaded event on child scope after linking the content', inject(
|
||||
function($rootScope, $compile, $templateCache) {
|
||||
var contentLoadedSpy = jasmine.createSpy('content loaded').andCallFake(function() {
|
||||
var contentLoadedSpy = jasmine.createSpy('content loaded').andCallFake(function(event) {
|
||||
expect(event.targetScope.$parent).toBe($rootScope);
|
||||
expect(element.text()).toBe('partial content');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user