for angularjs 1.x load async module
import angular, requireandangular-async-module(angular-ui-router is not necessary). config you app like angular.module('app', ['async.module.loader', ...]) and config require require.config({baseUrl: '/modules'}), then use async-tmpl directive and set attr : url to async-load modules.
- Install node.js
- Run
npm installfrom within the root project directory to install relevant dependencies - Run
npm startfrom within the root project directory to start the app - Open
http://localhost:8888/in the browser
you can set attrs loading-start and loading-end to do you need to do when loading, there is an attr scope-level you can set whene you use async-tmpl in deep scope, and you loading-start & loading-end function in out scope. Be careful : ng-transclude and ui-view will create a new child-scope.