Multiple components match node with tagname app-lobby

后端 未结 7 1118
刺人心
刺人心 2021-02-14 05:51

the code was running fine on angular version 8.3.4 but when i updated it to the latest version of angular ( 9 ) i got the following error

following is t

7条回答
  •  余生分开走
    2021-02-14 06:17

    The two answers above about declaring DatePipe in providers should be considered. Today I met this problem (Angular 9) when adding an argument private datePipe: DatePipe in the constructor of my component without declaring DatePipe in the module's provider. After adding DatePipe in providers, I have no more the problem.

    The constructor :

    constructor(private authenticationService: AuthenticationService, private datePipe: DatePipe) {}
    

提交回复
热议问题