diff options
| author | Igor Minar | 2011-06-06 10:15:17 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-06-06 23:10:27 -0700 | 
| commit | c6dbdde6dc875c96a0b89bcdef669eb9171259e0 (patch) | |
| tree | ae40b5b561e5c4dc9fb27d14e91ba85cfcd28437 /docs/src/templates/docs.js | |
| parent | f8417b48beaa3080e4e80784c11e8fa68afdec96 (diff) | |
| download | angular.js-c6dbdde6dc875c96a0b89bcdef669eb9171259e0.tar.bz2 | |
fix hashpath prefix for docs/sitemap/etc
Diffstat (limited to 'docs/src/templates/docs.js')
| -rw-r--r-- | docs/src/templates/docs.js | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js index e631d668..b6da7b97 100644 --- a/docs/src/templates/docs.js +++ b/docs/src/templates/docs.js @@ -6,21 +6,21 @@ function DocsController($location, $browser, $window) {    this.$location = $location;    if (!HAS_HASH.test($location.href)) { -    $location.hashPath = '!api/'; +    $location.hashPath = '!/api';    }    this.$watch('$location.hashPath', function(hashPath) {      if (hashPath.match(/^!/)) {        var parts = hashPath.substring(1).split('/'); -      self.sectionId = parts[0]; -      self.partialId = parts[1] || 'index'; +      self.sectionId = parts[1]; +      self.partialId = parts[2] || 'index';        self.pages = angular.Array.filter(NG_PAGES, {section:self.sectionId});        self.partialTitle = (angular.Array.filter(self.pages, function(doc){return doc.id == self.partialId;})[0]||{}).name;      }    });    this.getUrl = function(page){ -    return '#!' + page.section + '/' + page.id; +    return '#!/' + page.section + '/' + page.id;    };    this.getCurrentPartial = function(){ @@ -48,7 +48,7 @@ function DocsController($location, $browser, $window) {    this.afterPartialLoaded = function() {      SyntaxHighlighter.highlight();      $window.scrollTo(0,0); -    $window._gaq.push(['_trackPageview', $location.hashPath.replace('!', '/')]); +    $window._gaq.push(['_trackPageview', $location.hashPath.substr(1)]);    };    this.getFeedbackUrl = function() { | 
