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/directive.template | 2 --
docs/doc_widgets.js | 4 ----
docs/docs.js | 9 +++++++--
docs/formatter.template | 2 --
docs/index.html | 2 +-
docs/overview.template | 2 --
docs/validator.template | 2 --
docs/widget.template | 2 --
8 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/docs/directive.template b/docs/directive.template
index a3a11056..84b87ca7 100644
--- a/docs/directive.template
+++ b/docs/directive.template
@@ -35,5 +35,3 @@
{{{scenario}}}
{{/example}}
-
-
diff --git a/docs/doc_widgets.js b/docs/doc_widgets.js
index ed1dad8d..b119e326 100644
--- a/docs/doc_widgets.js
+++ b/docs/doc_widgets.js
@@ -54,10 +54,6 @@
} catch (e) {
alert(e);
}
-
- return function() {
- SyntaxHighlighter.highlight();
- };
});
function indent(text) {
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();
+ };
}
diff --git a/docs/formatter.template b/docs/formatter.template
index b0871a2d..af95f729 100644
--- a/docs/formatter.template
+++ b/docs/formatter.template
@@ -31,5 +31,3 @@ var modelValue = angular.formatter.{{shortName}}.parse(userInputString);
{{{scenario}}}
{{/example}}
-
-
diff --git a/docs/index.html b/docs/index.html
index 31630474..f20a1a85 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -39,7 +39,7 @@
-
+