diff options
| author | Misko Hevery | 2011-02-13 16:13:21 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2011-02-16 08:59:57 -0500 | 
| commit | c90abf057b0370cf5beb62aa960f1df008c802ef (patch) | |
| tree | 039525ec1ee518175010693efd278fa105815285 /test/AngularSpec.js | |
| parent | cdc093a463e8f8a925cbb9f2b55bedf0a1d8e7e8 (diff) | |
| download | angular.js-c90abf057b0370cf5beb62aa960f1df008c802ef.tar.bz2 | |
Changed the angular.compile(element)(scope[, cloneAttachNode])
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 8ff0631d..8753d887 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -369,8 +369,10 @@ describe('angular', function(){        var scope = angular.scope();        var template = jqLite('<div>{{greeting = "hello world"}}</div>');        var templateFn = angular.compile(template); -      var templateClone = template.cloneNode(); -      mvc = templateFn(scope, templateClone); +      var templateClone = template.clone(); +      mvc = templateFn(scope, function(clone){ +        templateClone = clone; +      });        expect(template.text()).toEqual('');        expect(mvc.view.text()).toEqual('hello world');        expect(mvc.view).toEqual(templateClone); @@ -380,7 +382,7 @@ describe('angular', function(){      it('should link to cloned node and create scope', function(){        var scope = angular.scope();        var template = jqLite('<div>{{greeting = "hello world"}}</div>'); -      mvc = angular.compile(template)(scope, true); +      mvc = angular.compile(template)(scope, noop);        expect(template.text()).toEqual('');        expect(mvc.view.text()).toEqual('hello world');        expect(mvc.scope.greeting).toEqual('hello world'); | 
