From 748a6c8d9d8d61c3ee18eec462abe8ff245d6a98 Mon Sep 17 00:00:00 2001 From: Siddique Hameed Date: Fri, 17 Jan 2014 12:17:22 -0600 Subject: 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 --- src/angular.suffix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/angular.suffix') 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(); -- cgit v1.2.3