ts代碼:html
today: any = Date.now(); times: any; this.times = setInterval(() => { this.today = Date.now(); });複製代碼
html代碼:bash
日期: {{today | date: 'yyyy年MM月dd日'}}複製代碼
結果:ui