Set an AngularJS date filter format to be used by all references to the date filter?

前端 未结 5 970
余生分开走
余生分开走 2021-02-18 18:03

Rather that having to define a custom format for each call to the date filter, is there a way to globally define a default format (other than \'medium\'

5条回答
  •  渐次进展
    2021-02-18 18:33

    The format defaults to mediumDate if none is provided. There is nothing built in to have it default to something else.

    https://github.com/angular/angular.js/blob/master/src/ng/filter/filters.js#L382

提交回复
热议问题