AngularJS 时间格式化

it2022-06-25  91

在AngularJs的controller里面进行格式化

vm.firstTime = $filter('date')(data.data, "yyyy-MM-dd hh:mm:ss");

在html中进行格式化

{{vm.secondTime | date:'yyyy-MM-dd hh:mm:ss'}}

示例代码:https://github.com/zLulus/NotePractice/blob/dev3/Website/NotePractice/Views/AngularjsStudy/TimeFormat.cshtml详细格式说明:http://www.jianshu.com/p/b25beea3d9ca

转载于:https://www.cnblogs.com/Lulus/p/7904584.html

相关资源:angularjs日期格式化及获得特定时间范围的公共service组件

最新回复(0)