mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
@@ -2222,5 +2222,15 @@ describe('$compile', function() {
|
||||
expect(nodeName_(comment)).toBe('#comment');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('should safely create transclude comment node and not break with "-->"',
|
||||
inject(function($rootScope) {
|
||||
// see: https://github.com/angular/angular.js/issues/1740
|
||||
element = $compile('<ul><li ng-repeat="item in [\'-->\', \'x\']">{{item}}|</li></ul>')($rootScope);
|
||||
$rootScope.$digest();
|
||||
|
||||
expect(element.text()).toBe('-->|x|');
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user