I'm using the following filter inside a h3:
{{ event.date | date:'dd-MM-yyyy' }}
And is working just fine, the angular is formatting and showing the date like I want. I'm trying to apply the same filter inside an ng-model
:
ng-model="event.date | date:'dd-MM-yyyy'"
And this is not working, is throwing an error:
Error: ngModel:nonassign
Non-Assignable Expression
Expression 'event.date' is non-assignable. Element: {1}
Could you someone explain me why?
Thanks!