问题描述
我正在尝试使用 Angular 日期管道将我的日期值格式化为 M/d/yy
。它在 localhost 中运行良好,但何时部署在远程服务器上 - 日期管道设置了不正确的格式 - YYYY-MM-DD HH-MM
。
这是我的代码:
@Component({
selector: 'app-date',template:
'<span>{{ curDate | date: this.dateFormat }}</span>',})
export class DateComponent<M> extends BaseComponent<M> {
dateFormat = 'M/d/yy';
curDate = this.date // 2021-03-24T07:57:50.711Z
}
有人可以帮我吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)