ped*_*nez 1 javascript typescript angular
我一直在看Angular 5的GET POST等:
get() {
return this.httpClient.get<any>('https://api.github.com/users/seeschweiler');
}
Run Code Online (Sandbox Code Playgroud)
要么
http.get<ItemsResponse>('/api/items')
.subscribe(
// Successful responses call the first callback.
data => {...},
// Errors will call this callback instead:
err => {
console.log('Something went wrong!');
});
Run Code Online (Sandbox Code Playgroud)
我不认为通常会使用诺言。
是因为不是真的需要它还是其他原因?
| 归档时间: |
|
| 查看次数: |
3436 次 |
| 最近记录: |