In Angular2, we can format the date using DatePipe using typescript as:
new DatePipe(navigator.language || 'en-US').transform(mydate, 'medium')
But, I want to do this on HTML side. I read that I can do like this:
mydate | date:'medium'
But, this is still not taking care of localization, as in, its not passing the language. How do I modify the usage of pipe in my HTML so I can pass the language also?