Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 07ce289

Browse files
committed
Shim the angular 1 reference from es6 to the global scope instead of the other way around
The other way was causing issues with conflicting versions of jquery. When components need to import a jquery extension and have it decorate the jquery object, it wasn't decorating the correct jquery reference. By doing this, we can have it running the way it was, but still make the upgrade module happy by making angular 1 available as a global
1 parent 4c705a7 commit 07ce289

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<script src="/node_modules/traceur/bin/traceur-runtime.js"></script>
2424

2525
<script src="/node_modules/systemjs/dist/system.js"></script>
26-
<script src="/node_modules/angular/angular.js"></script>
2726

2827
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
2928
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js"></script>-->
@@ -40,7 +39,10 @@
4039
<script src="/bootstrapper/app.bundle.js"></script>
4140

4241
<script>
43-
System.import('app');
42+
System.import('angular').then(angular => {
43+
window.angular = angular;
44+
System.import('app');
45+
});
4446
</script>
4547
</body>
4648
</html>

system.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,3 @@ System.config({
104104
map,
105105
packages: packages,
106106
});
107-
108-
System.registerDynamic('node_modules/angular/index.js', [], true, function() { return window.angular });

0 commit comments

Comments
 (0)