aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular.suffix
diff options
context:
space:
mode:
authorSiddique Hameed2014-01-17 12:17:22 -0600
committerPeter Bacon Darwin2014-03-18 12:02:19 +0000
commit748a6c8d9d8d61c3ee18eec462abe8ff245d6a98 (patch)
treee67d4f341b9c60a22f07af8b9579b7ae97ff8e3c /src/angular.suffix
parented4cd6c3c6a30ddfead1cbcf48f2ac6adf60a802 (diff)
downloadangular.js-748a6c8d9d8d61c3ee18eec462abe8ff245d6a98.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.suffix6
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();