I ran jspm install angular
and it installed it locally to my jspm_packages folder.
From code, I use regular ES6 imports like import angular from 'angular'
.
What do I need to do in order to load angular from a CDN and fallback to a local version if the CDN is unavailable?
You can have different config.js
files for development and production, where the production one gets angular from a CDN while development gets it locally. However, there is not (as far as I know) currently a way to have SystemJS try one source, then if that fails fallback to another source.
System.config({
"map": {
"jquery": "https://code.jquery.com/jquery-2.1.4.js"
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With