From 4af32de84a264e05eebfa6dbc09ce10fac1e1417 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 16 Nov 2010 13:39:50 -0800 Subject: docs should use ng:include onload --- docs/docs.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs/docs.js') diff --git a/docs/docs.js b/docs/docs.js index 96fba9cc..99b2aa2f 100644 --- a/docs/docs.js +++ b/docs/docs.js @@ -1,7 +1,7 @@ SyntaxHighlighter['defaults'].toolbar = false; -DocsController.$inject = ['$location', '$browser']; -function DocsController($location, $browser) { +DocsController.$inject = ['$location', '$browser', '$window']; +function DocsController($location, $browser, $window) { this.pages = NG_PAGES; window.$root = this.$root; @@ -26,6 +26,11 @@ function DocsController($location, $browser) { return 'level-' + depth + (page.name == this.getTitle() ? ' selected' : ''); }; + + this.afterPartialLoaded = function() { + $window.scroll(0,0); + SyntaxHighlighter.highlight(); + }; } -- cgit v1.2.3