I have the following code to show the current date:
this.whatTime = Observable.interval(1000).map(x => new Date()).share();
And in my template:
{{whatTime | async}}
My problem is that the date is too long and not formatted as I wish.
All I want to show is: 15/09/16 19:07:11
Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…