diff options
| author | Misko Hevery | 2013-06-11 13:08:21 -0700 |
|---|---|---|
| committer | Misko Hevery | 2013-06-11 13:14:34 -0700 |
| commit | b28f96949ac477b1fe43c81df7cedc21c7ab184c (patch) | |
| tree | d4fe798bbe154941a0caeb4592c3d614d057d9f1 /test/ng/compileSpec.js | |
| parent | 6b12432729848d3b34689f62a6bcd1766fd29720 (diff) | |
| download | angular.js-b28f96949ac477b1fe43c81df7cedc21c7ab184c.tar.bz2 | |
fix($compile): support multi-element group over text nodes
Diffstat (limited to 'test/ng/compileSpec.js')
| -rwxr-xr-x | test/ng/compileSpec.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 95b2ab72..99c0a6ad 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -2747,6 +2747,19 @@ describe('$compile', function() { })); + it('should support grouping over text nodes', inject(function($compile, $rootScope) { + $rootScope.show = false; + element = $compile( + '<div>' + + '<span ng-repeat-start="i in [1,2]">{{i}}A</span>' + + ':' + // Important: proves that we can iterate over non-elements + '<span ng-repeat-end>{{i}}B;</span>' + + '</div>')($rootScope); + $rootScope.$digest(); + expect(element.text()).toEqual('1A:1B;2A:2B;'); + })); + + it('should group on $root compile function', inject(function($compile, $rootScope) { $rootScope.show = false; element = $compile( |
