My require config is set up as follows:
require.config({
paths: {
'angular': 'bower_components/angular/angular',
'ui.router': 'bower_components/angular-ui-router/release/angular-ui-router'
},
shim: {
'angular': {
exports: 'angular'
},
'ui.router': {
deps: ['angular']
}
},
deps: [
'bootstrap'
]
});
After running this, it seems like angular can be accessed at window.angular
. Is that the expected behavior? In that case, do I even need to specify it as a dependency when using requirejs?
I attempted changing the key from angular
to ng
, and specifying ng
as a dependency. However, it was unable to find ng
at all. Despite this, window.angular
remained accessible.