aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/templates/docs.js
diff options
context:
space:
mode:
authorMisko Hevery2011-01-25 21:55:11 -0800
committerIgor Minar2011-01-26 23:31:15 -0800
commitbd33f60276a0fa37acffbad7a0cdcff92db594c8 (patch)
tree7cd957c19182ddc430a6320b77b2f03cb1bd223d /docs/src/templates/docs.js
parent8682befc7284a3c0b35cd5d85d4f42b1484ec71a (diff)
downloadangular.js-bd33f60276a0fa37acffbad7a0cdcff92db594c8.tar.bz2
Added part of guide documentation and supporting changes to doc generator
Diffstat (limited to 'docs/src/templates/docs.js')
-rw-r--r--docs/src/templates/docs.js10
1 files changed, 3 insertions, 7 deletions
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;