mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
docs should use ng:include onload
This commit is contained in:
parent
a130bb899d
commit
4af32de84a
8 changed files with 8 additions and 17 deletions
|
|
@ -35,5 +35,3 @@
|
|||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||
</doc:example>
|
||||
{{/example}}
|
||||
|
||||
<script>SyntaxHighlighter.highlight();</script>
|
||||
|
|
|
|||
|
|
@ -54,10 +54,6 @@
|
|||
} catch (e) {
|
||||
alert(e);
|
||||
}
|
||||
|
||||
return function() {
|
||||
SyntaxHighlighter.highlight();
|
||||
};
|
||||
});
|
||||
|
||||
function indent(text) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,5 +31,3 @@ var modelValue = angular.formatter.{{shortName}}.parse(userInputString);
|
|||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||
</doc:example>
|
||||
{{/example}}
|
||||
|
||||
<script>SyntaxHighlighter.highlight();</script>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -13,5 +13,3 @@
|
|||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||
</doc:example>
|
||||
{{/example}}
|
||||
|
||||
<script>SyntaxHighlighter.highlight();</script>
|
||||
|
|
|
|||
|
|
@ -37,5 +37,3 @@ angular.validator.{{shortName}}({{paramFirst.name}}{{#paramRest}}{{^default}}, {
|
|||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||
</doc:example>
|
||||
{{/example}}
|
||||
|
||||
<script>SyntaxHighlighter.highlight();</script>
|
||||
|
|
|
|||
|
|
@ -37,5 +37,3 @@
|
|||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||
</doc:example>
|
||||
{{/example}}
|
||||
|
||||
<script>SyntaxHighlighter.highlight();</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue