Hello,
I’m new to ionic and I developed an application that handles online orders and I use htt.get to recover data but as I compile android everything works; ios but I just can not recover the data on the emulator.
Can you help me thank you in advance.
My service:
‘use strict’;
app
.factory(‘zoneService’, function($http) {
var baseUrl = ‘http://www.my_domain.com/’;
return {
getAll: function() {
return $http.get(baseUrl+‘zone.php’);
}
};
});
my_controller :
‘use strict’;
app
.controller(‘HomeCtrl’, function($scope, $http, zoneService,PanierService){
…
zoneService.getAll().success(function(data){
$scope.zones = data.zones;
});
…
)};
my template: