Angular2 RC5 shared Component between Modules

后端 未结 3 1076
清歌不尽
清歌不尽 2020-12-17 17:23

I\'m just updating my angular2-app to new RC5. I got quite far, and everything seems ok, but now I want to re-organize it into NgModules

3条回答
  •  -上瘾入骨i
    2020-12-17 18:14

    You have to use shared module.

    SharedModule exists to make commonly used components, directives and pipes available for use in the templates of components in many other modules.

    You have to export & import it in other modules where ever you want.

    for more details see the link shared module

提交回复
热议问题