I am trying to redirect to another page after success callback but I am getting this error TypeError: Cannot read property 'push' of undefined
this.http.post('http://localhost:3030/users', userDetails).subscribe(function
successCallback(response) {
this.navCtrl.push(HomePage);
}, function errorCallback(response) {
// response with status 500
}) ;