Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Http get inside run section without response

$
0
0

Hi, i want to check the app version, the version is detected sucessfully via cordova plugin

I create a table to compare the device version against the oficial version every time the user open the app on his device, and can not get any response

I do inject $http into run

.run( function( $ionicPlatform, $ionicPopup, $http ) {

And try to get a response from the webservice

$http.get("http://www.someservice.com/check_version.php")
.then(
function(response){
console.log(response.data);
$ionicPopup.confirm({title: "2 Version", content: " scope data : "+$scope.data });
})

I did not get any response from http get, can i try anything diferent ?

The check for the version is ok

cordova.getAppVersion(function(version) {
        console.log('Version : '+version);
        appVersion = version
        console.log('appVersion : '+appVersion);
        $ionicPopup.confirm({title: "Version", content: "1. appVersion : "+appVersion })
    });

Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>