mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-22 10:49:24 +08:00
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
This commit is contained in:
committed by
Peter Bacon Darwin
parent
ed4cd6c3c6
commit
748a6c8d9d
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user