Rohit Rane
Rohit Rane

Reputation: 2930

Is it possible to Lazy load a component in Angular 2 like we can with a Module?

I have learnt that we can lazy load modules in an angular 2 application. But similarly is it possible to lazy load simply a component(instead of wrapping it in a module) : https://angular.io/docs/ts/latest/guide/ngmodule.html#!#lazy-load

Edit How to share resources like Components, Directives and Services between the main module and lazily loaded module?

Upvotes: 2

Views: 299

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657118

No, only modules are supported to be lazy loaded.

Upvotes: 3

Related Questions