diff options
| author | Igor Minar | 2012-05-03 00:15:07 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-05-03 23:31:28 -0700 | 
| commit | fff31d8d612430caf10a61a85e81e8c6c3629138 (patch) | |
| tree | 15b9bb2580ffd665122f52fb876119101f044c00 /test/ng/compileSpec.js | |
| parent | 9cba23a58847b8a856785a026aa95980cc690115 (diff) | |
| download | angular.js-fff31d8d612430caf10a61a85e81e8c6c3629138.tar.bz2 | |
style($compile): clean up the code and normalize fn names
Diffstat (limited to 'test/ng/compileSpec.js')
| -rw-r--r-- | test/ng/compileSpec.js | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 1c4a1d30..b2a6856b 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -1088,6 +1088,21 @@ describe('$compile', function() {          })); +        it('should allow creation of new scopes for replace directives with templates in a repeater', +            inject(function($rootScope, $compile, log, $httpBackend) { +          $httpBackend.expect('GET', 'trscope.html'). +              respond('<p><a log>{{name}}; scopeId: {{$id}} |</a></p>'); +          element = $compile('<div><span ng-repeat="i in [1,2,3]" trscope></span></div>')($rootScope); +          $httpBackend.flush(); +          expect(log).toEqual('LOG; log-003-002; 003; LOG; log-005-004; 005; LOG; log-007-006; 007'); +          $rootScope.name = 'Jozo'; +          $rootScope.$apply(); +          expect(element.text()).toBe('Jozo; scopeId: 003 |Jozo; scopeId: 005 |Jozo; scopeId: 007 |'); +          expect(element.find('p').scope().$id).toBe('003'); +          expect(element.find('a').scope().$id).toBe('003'); +        })); + +          it('should allow creation of new isolated scopes for directives with templates', inject(              function($rootScope, $compile, log, $httpBackend) {            $httpBackend.expect('GET', 'tiscope.html').respond('<a log></a>');  | 
