From 5d09a1efd3ff98fc2fbba2f8f64230704f4a5e96 Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Thu, 8 Mar 2012 15:42:35 -0800
Subject: 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
---
test/directive/ngIncludeSpec.js | 8 ++++----
test/directive/ngViewSpec.js | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
(limited to 'test/directive')
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('