diff options
| author | Igor Minar | 2012-06-11 23:49:24 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-06-12 00:10:18 -0700 |
| commit | f16150d5f1b20b3d633b4402095ea89baa4be042 (patch) | |
| tree | 9d5c570348264884174ecca52b958da7a821fcf8 /docs/spec/ngdocSpec.js | |
| parent | fc0b2b5715655a05cbb4c8e79969c95d7e7ce8b7 (diff) | |
| download | angular.js-f16150d5f1b20b3d633b4402095ea89baa4be042.tar.bz2 | |
docs(*): simplify doc urls
we now have two types of namespaces:
- true namespace: angular.* - used for all global apis
- virtual namespace: ng.*, ngMock.*, ... - used for all DI modules
the virual namespaces have services under the second namespace level (e.g. ng.)
and filters and directives prefixed with filter: and directive: respectively
(e.g. ng.filter:orderBy, ng.directive:ngRepeat)
this simplifies urls and makes them a lot shorter while still avoiding name collisions
Diffstat (limited to 'docs/spec/ngdocSpec.js')
| -rw-r--r-- | docs/spec/ngdocSpec.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js index b591a7de..0a7979f2 100644 --- a/docs/spec/ngdocSpec.js +++ b/docs/spec/ngdocSpec.js @@ -203,17 +203,17 @@ describe('ngdoc', function() { describe('merge', function() { it('should merge child with parent', function() { - var parent = new Doc({id: 'angular.module.ng.abc', name: 'angular.module.ng.abc', section: 'api'}); - var methodA = new Doc({name: 'methodA', methodOf: 'angular.module.ng.abc'}); - var methodB = new Doc({name: 'methodB', methodOf: 'angular.module.ng.abc'}); - var propA = new Doc({name: 'propA', propertyOf: 'angular.module.ng.abc'}); - var propB = new Doc({name: 'propB', propertyOf: 'angular.module.ng.abc'}); - var eventA = new Doc({name: 'eventA', eventOf: 'angular.module.ng.abc'}); - var eventB = new Doc({name: 'eventB', eventOf: 'angular.module.ng.abc'}); + var parent = new Doc({id: 'ng.abc', name: 'ng.abc', section: 'api'}); + var methodA = new Doc({name: 'methodA', methodOf: 'ng.abc'}); + var methodB = new Doc({name: 'methodB', methodOf: 'ng.abc'}); + var propA = new Doc({name: 'propA', propertyOf: 'ng.abc'}); + var propB = new Doc({name: 'propB', propertyOf: 'ng.abc'}); + var eventA = new Doc({name: 'eventA', eventOf: 'ng.abc'}); + var eventB = new Doc({name: 'eventB', eventOf: 'ng.abc'}); var docs = [methodB, methodA, eventB, eventA, propA, propB, parent]; // keep wrong order; ngdoc.merge(docs); expect(docs.length).toEqual(1); - expect(docs[0].id).toEqual('angular.module.ng.abc'); + expect(docs[0].id).toEqual('ng.abc'); expect(docs[0].methods).toEqual([methodA, methodB]); expect(docs[0].events).toEqual([eventA, eventB]); expect(docs[0].properties).toEqual([propA, propB]); @@ -283,8 +283,8 @@ describe('ngdoc', function() { expect(doc.requires).toEqual([ {name:'$service', text:'<p>for \n<code>A</code></p>'}, {name:'$another', text:'<p>for <code>B</code></p>'}]); - expect(doc.html()).toContain('<a href="api/angular.module.ng.$service">$service</a>'); - expect(doc.html()).toContain('<a href="api/angular.module.ng.$another">$another</a>'); + expect(doc.html()).toContain('<a href="api/ng.$service">$service</a>'); + expect(doc.html()).toContain('<a href="api/ng.$another">$another</a>'); expect(doc.html()).toContain('<p>for \n<code>A</code></p>'); expect(doc.html()).toContain('<p>for <code>B</code></p>'); }); |
