I want to use the datePipe in my component. I followed the instructions here but I am met with
Error: StaticInjectorError[DatePipe]: StaticInjectorError[Da
Pipes, unlike Services, are not injectable. In order to use pipe in a component, you need to create new instance of it:
ngOnInit() { console.log(new DatePipe().transform(this.currentDate, 'YYYY-MM-DDTHH:mm')); }