How to correctly import the Angular Material module through a shared module in Angular 4?

后端 未结 4 1121
灰色年华
灰色年华 2021-01-18 06:42

I\'m building an application using Angular paired with Angular Material, and I\'m having some issues with my modules structure.

As the guidelines suggest, importing

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 06:57

    Your approach is great. The structure that you have presented is an alternative that was presented in material.angular.io. I am unsure to why your tooltip does not work. But I would like to advise you to only use your custom MaterialModule only once on the root module. There is no need to import it in the SharedModule again.

提交回复
热议问题