In Angular 1.x, I was able to inject $filter and do something like this in my JavaScript/TypeScript code:
formattedDate = $filter('date')(new Date(), "yyyy-MM-dd");
Is there an equivalent in Angular 2?
In Angular 1.x, I was able to inject $filter and do something like this in my JavaScript/TypeScript code:
formattedDate = $filter('date')(new Date(), "yyyy-MM-dd");
Is there an equivalent in Angular 2?