Please help me to solve this problem. i want to get json response from api in partnerservice file. and from my login.ts i want to get the response from service but i get this error message
this is the code
login.ts
onLogin(){
if(!this.email){
this.nav.present(this.alert(‘Maaf Email Belum Diisi’));
}else if(!this.password){
this.nav.present(this.alert(‘Maaf password belum diisi’));
}else{
let data_login = JSON.stringify({
email: this.email,
password: this.password
});
let a = this.partnerService.login(data_login);
this.nav.present(this.setloading());
if(a.status=1){
console.log(‘success’);
}else{
console.log(‘error’);
}
}
}
partnerService
login(data_login){
let url= this.apiUrl + “PartnerLogin/” + this.apiKey;
this.http.post(url, data_login)
.map(res => res.json())
.subscribe(data => {
this.data = data;
return this.data;
});
}