diff options
| author | Igor Minar | 2013-01-09 22:07:33 -0800 | 
|---|---|---|
| committer | Igor Minar | 2013-01-14 21:57:23 -0800 | 
| commit | 74dd2f7980ea8ec434a6e0565d857c910653ed9b (patch) | |
| tree | 215bdf332e3465e6ed0160216c4dbd58a712a588 /test | |
| parent | c0cb9f8c14def36cc894fad4146b599531163f61 (diff) | |
| download | angular.js-74dd2f7980ea8ec434a6e0565d857c910653ed9b.tar.bz2 | |
fix($compile): safely create transclude comment nodes
Closes #1740
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/compileSpec.js | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 5b644af9..927a4ef7 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -2241,5 +2241,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|'); +    }));    });  }); | 
