2
我有我的供應商頁面功能調用的API-serive.ts離子2返回{ 「__zone_symbol__state」:空, 「__ zone_symbol__value」: 「塞浦路斯」}
//get city in profile
getCityInProfile(){
return new Promise((resolve, reject) => {
let headers = new Headers({ 'Authorization':
localStorage.getItem('token') });
this.http.get(this.getProfile,{headers:headers}).subscribe(
(res) => {
console.log (res.json().profile.location)
resolve(res.json().profile.location)
return (resolve(res.json().profile.location));
},(err) => {
reject(err);
});
})
}
,當我在另一個頁面調用這個函數.TS讓我的個人資料本市它返回:
{「__zone_symbol__state」:空,「__ zone_symbol__value」:「塞浦路斯」}
,這是我怎麼把它在我的網頁.ts
CityInProfile(){的console.log (JSON.stringify(this.jobsServiceProvider.getCityInProfile())+ '返回') this.cityProfile = this.jobsServiceProvider.getCityInProfile(); }
的價值是存在的(塞浦路斯),但爲什麼它返回這樣
非常感謝你! – noor