docs should use ng:include onload

This commit is contained in:
Igor Minar 2010-11-16 13:39:50 -08:00
parent a130bb899d
commit 4af32de84a
8 changed files with 8 additions and 17 deletions

View file

@ -35,5 +35,3 @@
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
<script>SyntaxHighlighter.highlight();</script>

View file

@ -54,10 +54,6 @@
} catch (e) {
alert(e);
}
return function() {
SyntaxHighlighter.highlight();
};
});
function indent(text) {

View file

@ -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();
};
}

View file

@ -31,5 +31,3 @@ var modelValue = angular.formatter.{{shortName}}.parse(userInputString);
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
<script>SyntaxHighlighter.highlight();</script>

View file

@ -39,7 +39,7 @@
</div>
</div>
<div id="section">
<ng:include src="getCurrentPartial()"></ng:include>
<ng:include src="getCurrentPartial()" onload="afterPartialLoaded()"></ng:include>
</div>
</div>
</body>

View file

@ -13,5 +13,3 @@
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
<script>SyntaxHighlighter.highlight();</script>

View file

@ -37,5 +37,3 @@ angular.validator.{{shortName}}({{paramFirst.name}}{{#paramRest}}{{^default}}, {
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
<script>SyntaxHighlighter.highlight();</script>

View file

@ -37,5 +37,3 @@
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
<script>SyntaxHighlighter.highlight();</script>