【发布时间】:2018-01-27 12:41:00
【问题描述】:
我是 typescript 的新手,我正在使用它来构建 Angular 应用程序。 有时我会看到这样的模型
export interface Item {
name: string
}
有时我会看到这个
export class Lesson {
constructor(
public $key:string)
}
使用像
这样的静态方法static fromJson({$key}) {}
有什么好处?
【问题讨论】:
-
谢谢,这就是我要找的!
标签: angular typescript