Is there a way to lazy load components, not modules, in Angular?

后端 未结 4 2028
南方客
南方客 2021-02-18 16:00

Lazy loading is a commonly used technique. However, in Angular it seems that the granularity level of this technique stops at the module level.

That means that you ca

4条回答
  •  悲&欢浪女
    2021-02-18 16:05

    A bit hacky ... but possible (future versions of Angular (beyond ver. 7) will implement an easier apporach)

    https://blog.angularindepth.com/dynamically-loading-components-with-angular-cli-92a3c69bcd28

提交回复
热议问题