diff options
| author | Siddique Hameed | 2014-01-17 12:17:22 -0600 | 
|---|---|---|
| committer | Vojta Jina | 2014-03-21 11:42:18 -0700 | 
| commit | 0d60f8d367e38224696749b0f7de04bd60649815 (patch) | |
| tree | 2d7b53a9e27f6f5578fad4da876b3488c4b49cb1 /src/angular.suffix | |
| parent | ca69dc6f1779221ffe01ac5542afc4433ab41a05 (diff) | |
| download | angular.js-0d60f8d367e38224696749b0f7de04bd60649815.tar.bz2 | |
fix(angular.bootstrap): only allow angular to load once
This is hard to test as a unit-test, since it involves the actual loading
of angular, but it turns out that it is easy to test using a protractor
e2e test.
Closes #5863
Closes #5587
Diffstat (limited to 'src/angular.suffix')
| -rw-r--r-- | src/angular.suffix | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/src/angular.suffix b/src/angular.suffix index c86200bb..9429d4fc 100644 --- a/src/angular.suffix +++ b/src/angular.suffix @@ -1,3 +1,9 @@ +  if (window.angular.bootstrap) { +    //AngularJS is already loaded, so we can return here... +    console.log('WARNING: Tried to load angular more than once.'); +    return; +  } +    //try to bind to jquery now so that one can write angular.element().read()    //but we will rebind on bootstrap again.    bindJQuery(); | 
