【发布时间】:2018-07-20 15:05:17
【问题描述】:
这种情况已经不是第一次了。我通过http调用post resquest:
this.http.post('url', this.simpleFilter)
.map((response: Response) => response.json())
.subscribe(data => {
if (data.data) {
this.simpleFilter = data.data;
console.log(this.simpleFilter.type);
console.log(this.simpleFilter);
this.emissorFilter.next(this.simpleFilter);
} else {
swal(data.error, data.message, 'error');
}
},
error => swal(data.error, data.message, 'error'));
我在哪里 console.log(this.simpleFilter.type) 打印类型是
1
但是当console.log(this.simpleFilter);打印对象的类型是什么
0
它发生的另一次
附:类型对象是一个枚举。
为什么会这样?
【问题讨论】:
标签: angular http-post subscription