aboutsummaryrefslogtreecommitdiffstats
path: root/test/directive/ngIncludeSpec.js
diff options
context:
space:
mode:
authorIgor Minar2012-03-08 15:42:35 -0800
committerIgor Minar2012-03-08 22:29:35 -0800
commit5d09a1efd3ff98fc2fbba2f8f64230704f4a5e96 (patch)
treea978ec1d082ee4e34a01090665f5ae59dc17377f /test/directive/ngIncludeSpec.js
parentf54db2ccda399f2677e4ca7588018cb31545a2b4 (diff)
downloadangular.js-5d09a1efd3ff98fc2fbba2f8f64230704f4a5e96.tar.bz2
fix(ng-view, ng-include): onload and $contentLoaded
- change custom onload directive to special arguments recongnized by both ng-view and ng-include - rename $contentLoaded event to $viewContentLoaded and $includeContentLoaded - add event docs
Diffstat (limited to 'test/directive/ngIncludeSpec.js')
-rw-r--r--test/directive/ngIncludeSpec.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/directive/ngIncludeSpec.js b/test/directive/ngIncludeSpec.js
index 79215096..dc761abc 100644
--- a/test/directive/ngIncludeSpec.js
+++ b/test/directive/ngIncludeSpec.js
@@ -64,14 +64,14 @@ describe('ng:include', function() {
}));
- it('should fire $contentLoaded event after linking the content', inject(
+ it('should fire $includeContentLoaded event after linking the content', inject(
function($rootScope, $compile, $templateCache) {
var contentLoadedSpy = jasmine.createSpy('content loaded').andCallFake(function() {
expect(element.text()).toBe('partial content');
});
$templateCache.put('url', [200, 'partial content', {}]);
- $rootScope.$on('$contentLoaded', contentLoadedSpy);
+ $rootScope.$on('$includeContentLoaded', contentLoadedSpy);
element = $compile('<ng:include src="\'url\'"></ng:include>')($rootScope);
$rootScope.$digest();
@@ -193,8 +193,8 @@ describe('ng:include', function() {
it('should compile only the content', inject(function($compile, $rootScope, $templateCache) {
// regression
- var onload = jasmine.createSpy('$contentLoaded');
- $rootScope.$on('$contentLoaded', onload);
+ var onload = jasmine.createSpy('$includeContentLoaded');
+ $rootScope.$on('$includeContentLoaded', onload);
$templateCache.put('tpl.html', [200, 'partial {{tpl}}', {}]);
element = $compile('<div><div ng:repeat="i in [1]">' +