Angular2 load-children loader
This is a webpack loader to Angular2 lazy module loading.
It's recommended to use this loader with webpack 2.x.
- INPUT:
;
- OUTPUT:
;
And this loader return a function to call the require
function with .ngfactory
suffix if the resource is generated by compiler-cli:
export const appRoutes: Routes = [
{path: "", component: MainHomeComponent},
{path: "about", component: MainAboutComponent },
{path: "sub", loadChildren: () => System.import("./sub.module.ngfactory").then(m => m["SubModuleNgFactory"]) },
];
Install
npm install angular2-webpack2-lazy-children-loader -D
npm install @types/node -D
or
typings install node
Notice
Fork of angular2-load-children-loader
License
MIT