Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(ngModelOptions): mention that it's inherited
Browse files Browse the repository at this point in the history
Closes #9096
Closes #7212
  • Loading branch information
stephenbunch authored and petebacondarwin committed Sep 16, 2014
1 parent cfdd161 commit 02dc2aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
15 changes: 12 additions & 3 deletions src/ng/directive/ngInclude.js
Expand Up @@ -150,6 +150,9 @@
* @eventType emit on the scope ngInclude was declared in
* @description
* Emitted every time the ngInclude content is requested.
*
* @param {Object} angularEvent Synthetic event object.
* @param {String} src URL of content to load.
*/


Expand All @@ -159,6 +162,9 @@
* @eventType emit on the current ngInclude scope
* @description
* Emitted every time the ngInclude content is reloaded.
*
* @param {Object} angularEvent Synthetic event object.
* @param {String} src URL of content to load.
*/


Expand All @@ -168,6 +174,9 @@
* @eventType emit on the scope ngInclude was declared in
* @description
* Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299)
*
* @param {Object} angularEvent Synthetic event object.
* @param {String} src URL of content to load.
*/
var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',
function($templateRequest, $anchorScroll, $animate, $sce) {
Expand Down Expand Up @@ -236,15 +245,15 @@ var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce
currentScope = newScope;
currentElement = clone;

currentScope.$emit('$includeContentLoaded');
currentScope.$emit('$includeContentLoaded', src);
scope.$eval(onloadExp);
}, function() {
if (thisChangeId === changeCounter) {
cleanupLastIncludeContent();
scope.$emit('$includeContentError');
scope.$emit('$includeContentError', src);
}
});
scope.$emit('$includeContentRequested');
scope.$emit('$includeContentRequested', src);
} else {
cleanupLastIncludeContent();
ctrl.template = null;
Expand Down
6 changes: 3 additions & 3 deletions test/ng/directive/ngIncludeSpec.js
Expand Up @@ -121,7 +121,7 @@ describe('ngInclude', function() {
element = $compile('<div><div><ng:include src="\'url\'"></ng:include></div></div>')($rootScope);
$rootScope.$digest();

expect(contentRequestedSpy).toHaveBeenCalledOnce();
expect(contentRequestedSpy).toHaveBeenCalledOnceWith(jasmine.any(Object), 'url');

$httpBackend.flush();
}));
Expand All @@ -139,7 +139,7 @@ describe('ngInclude', function() {
element = $compile('<div><div><ng:include src="\'url\'"></ng:include></div></div>')($rootScope);
$rootScope.$digest();

expect(contentLoadedSpy).toHaveBeenCalledOnce();
expect(contentLoadedSpy).toHaveBeenCalledOnceWith(jasmine.any(Object), 'url');
}));


Expand All @@ -161,7 +161,7 @@ describe('ngInclude', function() {
$httpBackend.flush();

expect(contentLoadedSpy).not.toHaveBeenCalled();
expect(contentErrorSpy).toHaveBeenCalledOnce();
expect(contentErrorSpy).toHaveBeenCalledOnceWith(jasmine.any(Object), 'tpl.html');
expect(element.children('div').contents().length).toBe(0);
}));

Expand Down

0 comments on commit 02dc2aa

Please sign in to comment.