angular 日期(陽曆)

anangular日期陽曆寫法:

ts代碼:html

today: any = Date.now();
times: any;

this.times = setInterval(() => {
    this.today = Date.now();
});複製代碼

html代碼:bash

日期: {{today | date: 'yyyy年MM月dd日'}}複製代碼

結果:ui

相關文章
相關標籤/搜索