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.js | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
(limited to 'src/Angular.js')
diff --git a/src/Angular.js b/src/Angular.js
index 96df13f4..ec69cc1a 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -1241,6 +1241,41 @@ function angularInit(element, bootstrap) {
  * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
  * They must use {@link ng.directive:ngApp ngApp}.
  *
+ * Angular will detect if it has been loaded into the browser more than once and only allow the
+ * first loaded script to be bootstrapped and will report a warning to the browser console for
+ * each of the subsequent scripts.   This prevents strange results in applications, where otherwise
+ * multiple instances of Angular try to work on the DOM.
+ *
+ * 
+ * 
+ * 
+ * 
+ *   
+ *   
+ *     | {{heading}}+ * | 
+ *   
+ *     | {{fill}}+ * | 
+ * 
+ *