Throw error when AngularJS is missing.
Bunch of changes related to the upcoming update:
1. We don’t throw if angular isn’t loaded yet. We will throw if the loader is started and angular isn’t loaded.
2. noinit mode where the initialization isn’t completed.
3. Get the script tag by checking for the filename ‘angularjs-loader.js’. This doesn’t bode well with minification but will be solved later.
4. Check every script if angular.module was overridden by the script loaded. Override angular.module with our own again if it was.
If no app is specified on the tag itself, do nothing at initialization other than loading the proper arguments.
If angular is defined, initialize the original module function, otherwise wait for a script to be loaded before checking. This allows us to not load AngularJS before and to call angular.loader(‘angular’), which may sound weird but is not really.
Again, a bunch of changes…
1. Config now has default.
2. Path transform is changed so that if the path map in config has the value, the xform is not executed.
3. Added the possibility to add a bootstrap function in init options.
4. Fix a bug where we returned the defer instead of its promise.
5. Extend now extend all config options instead of the config object as a whole. This allow us to call angular.loader.config() multiple time, but not override what we set before.
6. Only lock the main module (we’re still expecting it to be loaded) on init(). We load the main module outside of it now in the generic case.
7. The main module is expected again… sigh.
Formatting.
Bug fix: we are looking at the value to make sure the deferred succeeded, so we need at least to resolve to true.
Bug fix: better fix than the last commit.
Allow calls to angular.loader() to specify that we expect modules to be declared in the scripts loaded. This makes it easier in some cases (and very useful). Expect angular.module() to call angular.loader() at some point.
Bug fix: we might be overriding angular.module() twice if we load scripts in parallels.
Simpler set.
Do not initialize the loader if either noinit is non-empty on the script tag OR __angular_loader_noinit is set to true.
Version 0.6.0 was overdue.