From bd33f60276a0fa37acffbad7a0cdcff92db594c8 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 25 Jan 2011 21:55:11 -0800 Subject: Added part of guide documentation and supporting changes to doc generator --- docs/src/templates/docs.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'docs/src/templates/docs.js') diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js index f1cfc3e7..aaea8c9d 100644 --- a/docs/src/templates/docs.js +++ b/docs/src/templates/docs.js @@ -4,7 +4,7 @@ function DocsController($location, $browser, $window) { window.$root = this.$root; this.getUrl = function(page){ - return '#!' + page.name; + return '#!' + page.id; }; this.getCurrentPartial = function(){ @@ -13,14 +13,14 @@ function DocsController($location, $browser, $window) { this.getTitle = function(){ var hashPath = $location.hashPath || '!angular'; - if (hashPath.match(/^!angular/)) { + if (hashPath.match(/^!/)) { this.partialTitle = hashPath.substring(1); } return this.partialTitle; }; this.getClass = function(page) { - var depth = page.name.split(/\./).length - 1, + var depth = page.depth, cssClass = 'level-' + depth + (page.name == this.getTitle() ? ' selected' : ''); if (depth == 1 && page.type !== 'overview') cssClass += ' level-angular'; @@ -40,8 +40,4 @@ function DocsController($location, $browser, $window) { } -angular.filter('short', function(name){ - return (name||'').split(/\./).pop(); -}); - SyntaxHighlighter['defaults'].toolbar = false; -- cgit v1.2.3