Load ngModule and its components based on conditional in Angular

后端 未结 2 564
独厮守ぢ
独厮守ぢ 2020-12-19 03:16

I\'m new in angular and I was wondering if it\'s possible to load and module and its components I made based on a conditional on the app.module or where would it be the best

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-19 03:45

    Modules are loaded at the start of your application. You need to import the components, and use whichever component you need. You need to register your component to a module, so that your component is accessible.

提交回复
热议问题