Skip to content

mosby-zhou/angular-async-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-async-module

for angularjs 1.x load async module

Start

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.

How to run the demo

  • Install node.js
  • Run npm install from within the root project directory to install relevant dependencies
  • Run npm start from within the root project directory to start the app
  • Open http://localhost:8888/ in the browser

Help

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.

About

for angularjs1.x load async module

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published