typescript ap.ts
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript ap.ts相关的知识,希望对你有一定的参考价值。
@Component({
selector: 'my-app',
template: `
<div>
<p>{{ (person | async)?.id }}</p>
<p>{{ (person | async)?.title }}</p>
<p>{{ (person | async)?.body }}</p>
</div>
`,
})
export class App {
constructor(public http: Http) {
this.person = this.http.get('https://jsonplaceholder.typicode.com/posts/1')
.map(res => res.json())
}
}
以上是关于typescript ap.ts的主要内容,如果未能解决你的问题,请参考以下文章
typescript ap1.ts
typescript ap.ts
TypeScript入门学习之路
typescript TypeScript Snippets #typescript
TypeScript入门五:TypeScript的接口
TypeScript系列教程--初探TypeScript