Angular Date Pipe not working after ugrade to Angular 5

I use a simple data pipe in my html page:

this is the code

<div>{{item.validationdate | date }}</div>

and the error is this

ERROR TypeError: Cannot read property 'toLowerCase' of undefined

if i remove the pipe the result is this:


How Can i resolve this issue without the custom pipe but using the pipe of angular?


Apologies for the self-promotion, but I literally just published a date pipe library that I wrote because the Angular date pipe was acting inconsistent. To answer your question without an external library, we would probably have to see how and when you define your item variable.