-
-
Save totten/6e6a84df8ef32be7e76b to your computer and use it in GitHub Desktop.
Order of <script> tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
The Civi-Angular modules require certain data be available. This example is good because the data is loaded | |
before the modules. | |
--> | |
<script type="text/javascript"> | |
var CRM={"config":...}; | |
</script> | |
... | |
<script type="text/javascript" src="http://d46.demo.civicrm.org/sites/all/modules/civicrm/bower_components/angular/angular.min.js?nnu1sv"></script> | |
<script type="text/javascript" src="/civicrm/ajax/angular-modules?format=js&r=xyhQt"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
The Civi-Angular modules require certain data be available. This example is bad because the data is loaded | |
after the modules. | |
--> | |
<script type="text/javascript" src="http://d46.demo.civicrm.org/sites/all/modules/civicrm/bower_components/angular/angular.min.js?nnu1sv"></script> | |
<script type="text/javascript" src="/civicrm/ajax/angular-modules?format=js&r=xyhQt"></script> | |
<script type="text/javascript"> | |
var CRM={"config":...}; | |
</script> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notes: | |
v4.6.0 and v4.6.2 would present a bit differently. In v4.6.0, there are half a dozen | |
files loaded from civicrm/js/angular-*.js. In v4.6.2, those are consolidated into a single | |
request for civicrm/ajax/angular-modules?format=js. However, these have the same | |
ordering requirements -- they must appear *after* the "var CRM=..." snippet. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment