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
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) {}