aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/spec/ngdocSpec.js3
-rw-r--r--docs/src/ngdoc.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js
index cb11c1a5..7ad364c0 100644
--- a/docs/spec/ngdocSpec.js
+++ b/docs/spec/ngdocSpec.js
@@ -119,6 +119,9 @@ describe('ngdoc', function(){
expect(doc.convertUrlToAbsolute('angular.widget')).toEqual('section/angular.widget');
});
+ it('should change id to index if not specified', function() {
+ expect(doc.convertUrlToAbsolute('guide/')).toEqual('guide/index');
+ });
});
describe('sorting', function(){
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js
index 70e393a8..fa3fbdac 100644
--- a/docs/src/ngdoc.js
+++ b/docs/src/ngdoc.js
@@ -72,9 +72,8 @@ Doc.prototype = {
* @returns {string} Absolute url
*/
convertUrlToAbsolute: function(url) {
+ if (url.substr(-1) == '/') return url + 'index';
if (url.match(/\//)) return url;
-
- // remove this after
return this.section + '/' + url;
},