i have designed app using ionic and angularjs. Earlier the app was working fine but now i have changed the api ....the app working on browser but not on device...its functionalities not working on device.. before changed the api(app working on device):
var CONSTANTS = "http://ip_address/api/";
var api = CONSTANTS+'api.php?method=register' + '&user_registration=';
$http.post(api, {username : username,email : useremail,pwd : userpassword}).success(function(response) {
if( response[0].status == 1){
$cordovaToast.showShortBottom('Successfully Registered').then(function(success) {
// success
}, function (error) {
// error
});
document.getElementById('user_email').innerHTML = "";
document.getElementById('user_email').innerHTML = "";
document.getElementById('user_email').innerHTML = "";
$state.go('auth.login');
}else if( response[0].status == 0){
$cordovaToast.showLongBottom('Existing User or Invalid Data').then(function(success) {
// success
}, function (error) {
// error
});
}else {
//console.log('Error');
}
}, function(err) {
// console.log(err);
});
after changing the api in the code(app not working on device):
var CONSTANTS = "https://www.test.com/api/";
var api = CONSTANTS+'api.php?method=register' + '&user_registration=';
$http.post(...)... // Same as above