Hi there, I confused for getting error on login. I try create HttpClient login. I’ve got error and response {"isTrusted":true}
. I think that is cause cors. what should I do for solving this problem.
this my code:
var head = new Headers();
this.getUrl();
head.append('Content-Type', 'application/json');
head.append('comp-id', data.compID);
head.append('x-access-token', mytoken);
this.http.testPost(url + 'user/authentication', this.userData).subscribe(
data => {
this.navCtrl.setRoot(HomePage, {}, { animate: true, direction: 'forward' });
this.load.dismiss();
},
error => {
var e = error.json();
this.alert.presentAlert('Login failed', JSON.stringify(e)).present();
this.load.dismiss();
});