Closed wuxiangege closed 8 years ago
makePost(): void { this.loading = true; this.http.post( "http://jsonplaceholder.typicode.com/posts", JSON.stringify({ body: "bar", title: "foo", userId: 1 })) .toRx() .subscribe((res: Response) => { this.data = res.json(); this.loading = false; }); }
makePost(): void { this.loading = true; this.http.post( "http://jsonplaceholder.typicode.com/posts", JSON.stringify({ body: "bar", title: "foo", userId: 1 })) .toRx() .subscribe((res: Response) => { this.data = res.json(); this.loading = false; }); }