我正在使用json-server
. localhost:3000
它工作正常,我能够在 Angular 中获取数据http.get
。我想阅读响应头X-Total-Count
,在 angular .subscribe 内。但是我在响应标头中看不到该属性。但 Chrome 控制台显示X-Total-Count: 16
.
this.catgoryItems.getAllServices(
{
_page: pageIndex || this.pageIndex,
_limit: limit || this.limit
})
.subscribe((response: any) => {
console.log(response);
this.dataSource = response.body;
}, err => {
console.log(err);
this.alertService.showError('Error, plz try again later');
});