diff options
| author | Misko Hevery | 2011-11-08 17:40:03 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2011-11-14 20:31:15 -0800 | 
| commit | 085e3c611fd0cd48757702c50c67b551a00a0d38 (patch) | |
| tree | 879f19d0a829c828c3636b38c8c422f732a829a9 /test/directivesSpec.js | |
| parent | 4b35a59c6afd5093ed5ce7d68b75ccadd4c53696 (diff) | |
| download | angular.js-085e3c611fd0cd48757702c50c67b551a00a0d38.tar.bz2 | |
new(directive): added ng:module directive for loading modules
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 93682fa0..51cc5489 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -535,4 +535,17 @@ describe("directive", function() {        expect(element.hasClass('bar')).toBe(true);      }));    }); + +  describe('ng:module', function() { +    it('should install the modules', inject(function($injector, $compile, $rootScope) { +      var log = ''; +      var injector = $injector; +      angular.module.a = function($injector){ log += ($injector == injector) + ';';}; +      angular.module.b = function($injector){ log += ($injector == injector); } +      $compile('<div ng:module="   a, ,,, b "></div>')($rootScope); +      expect(log).toEqual('true;true'); +      delete angular.module.a; +      delete angular.module.b; +    })); +  });  }); | 
