![](/img/trans.png)
[英]What method is used for textual representation of the data in AngularJS?
[英]What is the data type that is used in typescript to denote a time?
我需要在打字稿中定義一個時間,因此我已將數據類型用作時間。 但它給出了一個錯誤。 關於數據類型有什么建議嗎?
Here is the code which I'm getting the error.
export class Path {
public id:number;
public fromLoaction: string;
public toLocation: string;
public cost: number;
public time: time;
}
Date
存儲時間和日期:
public time: Date;
this.time = new Date();
console.log(this.time.getHours() + ':' + this.time.getMinutes());
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.