diff options
| author | Misko Hevery | 2010-11-09 11:22:52 -0800 |
|---|---|---|
| committer | Igor Minar | 2010-11-09 22:27:37 -0800 |
| commit | a7e8a503fd088f5b01e8b14de61dfc60c1f13451 (patch) | |
| tree | 7fc39b1a96762ed2d41e3ad9cef8441bb0394844 /docs/index.html | |
| parent | 324694a58b6d0ed33e05b511be4767573d9187dd (diff) | |
| download | angular.js-a7e8a503fd088f5b01e8b14de61dfc60c1f13451.tar.bz2 | |
proper trimming of leading whitespace; url restriction to angular.*
Diffstat (limited to 'docs/index.html')
| -rw-r--r-- | docs/index.html | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/index.html b/docs/index.html index 07eac809..3495f6c8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,14 +12,22 @@ <link rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" type="text/css" media="screen" /> <script type="text/javascript"> SyntaxHighlighter['defaults'].toolbar = false; - - function DocsController() { + + DocsController.$inject = ['$location'] + function DocsController($location) { this.docs = NG_DOC; window.$root = this.$root; this.getUrl = function(page){ return '#' + encodeURIComponent(page.name); } + + this.getCurrentPartial = function(){ + if ($location.hashPath.match(/^angular\./)) { + this.partialUrl = './' + $location.hashPath + '.html'; + } + return this.partialUrl; + } } </script> </head> @@ -34,7 +42,7 @@ </div> </div> </td> - <td valign="top"><ng:include src=" './' + $location.hashPath + '.html' "></ng:include></td> + <td valign="top"><ng:include src=" getCurrentPartial() "></ng:include></td> </tr> </table> </body> |
