mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-28 07:23:59 +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:scenario>{{{scenario}}}</doc:scenario>
|
||||||
</doc:example>
|
</doc:example>
|
||||||
{{/example}}
|
{{/example}}
|
||||||
|
|
||||||
<script>SyntaxHighlighter.highlight();</script>
|
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,6 @@
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
alert(e);
|
alert(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function() {
|
|
||||||
SyntaxHighlighter.highlight();
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function indent(text) {
|
function indent(text) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
SyntaxHighlighter['defaults'].toolbar = false;
|
SyntaxHighlighter['defaults'].toolbar = false;
|
||||||
|
|
||||||
DocsController.$inject = ['$location', '$browser'];
|
DocsController.$inject = ['$location', '$browser', '$window'];
|
||||||
function DocsController($location, $browser) {
|
function DocsController($location, $browser, $window) {
|
||||||
this.pages = NG_PAGES;
|
this.pages = NG_PAGES;
|
||||||
window.$root = this.$root;
|
window.$root = this.$root;
|
||||||
|
|
||||||
|
|
@ -26,6 +26,11 @@ function DocsController($location, $browser) {
|
||||||
return 'level-' + depth +
|
return 'level-' + depth +
|
||||||
(page.name == this.getTitle() ? ' selected' : '');
|
(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:scenario>{{{scenario}}}</doc:scenario>
|
||||||
</doc:example>
|
</doc:example>
|
||||||
{{/example}}
|
{{/example}}
|
||||||
|
|
||||||
<script>SyntaxHighlighter.highlight();</script>
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="section">
|
<div id="section">
|
||||||
<ng:include src="getCurrentPartial()"></ng:include>
|
<ng:include src="getCurrentPartial()" onload="afterPartialLoaded()"></ng:include>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,3 @@
|
||||||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||||
</doc:example>
|
</doc:example>
|
||||||
{{/example}}
|
{{/example}}
|
||||||
|
|
||||||
<script>SyntaxHighlighter.highlight();</script>
|
|
||||||
|
|
|
||||||
|
|
@ -37,5 +37,3 @@ angular.validator.{{shortName}}({{paramFirst.name}}{{#paramRest}}{{^default}}, {
|
||||||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||||
</doc:example>
|
</doc:example>
|
||||||
{{/example}}
|
{{/example}}
|
||||||
|
|
||||||
<script>SyntaxHighlighter.highlight();</script>
|
|
||||||
|
|
|
||||||
|
|
@ -37,5 +37,3 @@
|
||||||
<doc:scenario>{{{scenario}}}</doc:scenario>
|
<doc:scenario>{{{scenario}}}</doc:scenario>
|
||||||
</doc:example>
|
</doc:example>
|
||||||
{{/example}}
|
{{/example}}
|
||||||
|
|
||||||
<script>SyntaxHighlighter.highlight();</script>
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue