diff options
| author | Vojta Jina | 2012-09-17 16:55:48 -0700 | 
|---|---|---|
| committer | Vojta Jina | 2012-09-17 18:08:16 -0700 | 
| commit | bcaa3bb3739c3b964750c49b216bf34bb0d8f3f6 (patch) | |
| tree | b26796003e1531eaadabc5fb16572acd54e90bec /docs/src | |
| parent | 6fc4fdb4383b42002071bdf74a93ee0ac1bb8b90 (diff) | |
| download | angular.js-bcaa3bb3739c3b964750c49b216bf34bb0d8f3f6.tar.bz2 | |
docs: load angular from CDN only on production
So that when running the docs locally, eg. during e2e testing, we use the latest build version of angular, rather than the stable one from CDN.
This fixes e2e tests running with Testacular.
Diffstat (limited to 'docs/src')
| -rw-r--r-- | docs/src/templates/index.html | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 38b6d97b..625c449b 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -22,7 +22,7 @@            baseUrl = location.href.replace(rUrl, indexFile),            jQuery = /index-jq[^\.]*\.html$/.test(baseUrl),            debug = /index[^\.]*-debug\.html$/.test(baseUrl), -          gae = (baseUrl.split('/').length == 4), +          production = location.hostname === 'docs.angularjs.org',            headEl = document.getElementsByTagName('head')[0],            sync = true,            angularVersion = { @@ -45,7 +45,7 @@        addTag('script', {src: 'docs-keywords.js'}, sync);        function path(name) { -        if (gae) { +        if (production) {            if (name.match(/^angular(-\w+)?\.js/) && !name.match(/bootstrap/)) {              name =  '//ajax.googleapis.com/ajax/libs/angularjs/' +                  angularVersion.stable + | 
