mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-09 15:24:43 +00:00
test(ngRepeat): disable an element directive test on IE8
This commit is contained in:
parent
c46c5924c4
commit
726e0c246b
1 changed files with 19 additions and 15 deletions
|
|
@ -523,21 +523,25 @@ describe('ngRepeat', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should work when placed on a root element of element directive with ASYNC replaced template',
|
if (!msie || msie > 8) {
|
||||||
inject(function($templateCache, $compile, $rootScope) {
|
// only IE>8 supports element directives
|
||||||
$compileProvider.directive('replaceMeWithRepeater', function() {
|
|
||||||
return {
|
it('should work when placed on a root element of element directive with ASYNC replaced template',
|
||||||
restrict: 'E',
|
inject(function($templateCache, $compile, $rootScope) {
|
||||||
replace: true,
|
$compileProvider.directive('replaceMeWithRepeater', function() {
|
||||||
templateUrl: 'replace-me-with-repeater.html'
|
return {
|
||||||
};
|
restrict: 'E',
|
||||||
});
|
replace: true,
|
||||||
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
|
templateUrl: 'replace-me-with-repeater.html'
|
||||||
element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope);
|
};
|
||||||
expect(element.text()).toBe('');
|
});
|
||||||
$rootScope.$apply();
|
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
|
||||||
expect(element.text()).toBe('123');
|
element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope);
|
||||||
}));
|
expect(element.text()).toBe('');
|
||||||
|
$rootScope.$apply();
|
||||||
|
expect(element.text()).toBe('123');
|
||||||
|
}));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue