anangular日期陽曆寫法:
ts程式碼:
today: any = Date.now();
times: any;
this.times = setInterval(() => {
this.today = Date.now();
});複製程式碼
html程式碼:
日期: {{today | date: 'yyyy年MM月dd日'}}複製程式碼
結果:
ts程式碼:
today: any = Date.now();
times: any;
this.times = setInterval(() => {
this.today = Date.now();
});複製程式碼
html程式碼:
日期: {{today | date: 'yyyy年MM月dd日'}}複製程式碼
結果: