Socket
Socket
Sign inDemoInstall

angular2-webpack2-lazy-children-loader

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular2-webpack2-lazy-children-loader

A webpack loader for ng2 lazy loading


Version published
Weekly downloads
2
Maintainers
1
Install size
5.91 kB
Created
Weekly downloads
 

Readme

Source

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:
export const appRoutes: Routes = [
  {path: "", component: MainHomeComponent},
  {path: "about", component: MainAboutComponent },
  {path: "sub", loadChildren: "./sub.module#SubModule" },
];
  • OUTPUT:
export const appRoutes: Routes = [
  {path: "", component: MainHomeComponent},
  {path: "about", component: MainAboutComponent },
  {path: "sub", loadChildren: () => System.import("./sub.module").then(m => m["SubModule"]) },
];

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

Keywords

FAQs

Last updated on 24 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc