heznja
Last Updated: February 25, 2016
·
13.81K
· clonn
D4b19c40066abd9558bd63aa88c1bffe

moment.js usage in angular

moment.js, it is cool for support time / date display issue, you do not need parse again, moment already done all of you want.

Also support i18n feature, include timezone file, then you can choose your local name to config.

angular-moment

of course, angular community already built moment supporting moment.js.

angular-moment Usage,

config,

  angular.module("myapp").constant 'angularMomentConfig',
preprocess: 'utc',
timezone: 'Asia/Taipei'

view

{{start_time | amDateFormat:'YYYY-MMM-Do ddd'}}
Say Thanks
Respond

2 Responses
Add your response

15938

nice post, thanks

over 1 year ago ·
15941
D4b19c40066abd9558bd63aa88c1bffe

thanks

over 1 year ago ·