I have the following code (AJS + Cordova):
$scope.update = function () {
myService.update()
.then(function (response) {
$scope.result = response.data;//prints [Object object]
console.log("Success!..." + response.data + "result.." + $scope.result);
angular.forEach($scope.result, function(value, key){
console.log(key + ': ' + value); //prints success:true
// $location.url(""+urlToGo);
$window.location.href = urlToGo;
})
},
function (error) {
$scope.status = 'Unable toget resposne ' + error;
});
};
Here, $window.location.href = urlToGo; will open a new window in mobile browser, which means user will leave my app. So, is there any technique, I can handle it inside my app using Angular or Cordova, without showing browser to him?