I'm trying to find a tool or a .js lib to lazy load my scripts on demand of the routes/urls'.
Basically, I want to:
state = {
state: 'widgets',
config: {
url: '/',
templateUrl: 'modules/widgets/templates/widgets.template.html',
resolve: {
// load the .js somehow
}
}
$stateProvider.state(state.state, state.config);
have anyone already done that? or is there a stand for lazy load .js files?
Thanks!