mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-11 08:13:10 +00:00
test(ngRepeat): fix IE8 test compatibility issue
This commit is contained in:
parent
807394095b
commit
0c6fb665a4
1 changed files with 2 additions and 2 deletions
|
|
@ -527,13 +527,13 @@ describe('ngRepeat', function() {
|
||||||
inject(function($templateCache, $compile, $rootScope) {
|
inject(function($templateCache, $compile, $rootScope) {
|
||||||
$compileProvider.directive('replaceMeWithRepeater', function() {
|
$compileProvider.directive('replaceMeWithRepeater', function() {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'A',
|
||||||
replace: true,
|
replace: true,
|
||||||
templateUrl: 'replace-me-with-repeater.html'
|
templateUrl: 'replace-me-with-repeater.html'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
|
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
|
||||||
element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope);
|
element = $compile('<div><div replace-me-with-repeater></div></div>')($rootScope);
|
||||||
expect(element.text()).toBe('');
|
expect(element.text()).toBe('');
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
expect(element.text()).toBe('123');
|
expect(element.text()).toBe('123');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue