I am working in a app where I am displaying the posts of a WordPress account. When test the app in the browser everything works fine, I have my app for now in a DIVSHOT, but when I open the app in my mobile browser, I can’t see non post.
Here is my code
.service('FreshlyPressed', function($http, $q) {
return {
getBlogs: function($scope) {
var posts = [];
$http.get('http://urbanetradio.com/wp-json/posts')
.success(function(result) {
$scope.posts = result;
})
},
getPostById: function(postId) {
var url ='http://urbanetradio.com/wp-json/posts/'+ postId;
return $http.get(url);
}
}
});
the controller
.controller('NewsCtrl', function($scope, $ionicLoading, FreshlyPressed) {
$scope.posts = [];
$scope.doRefresh = function() {
$scope.posts = FreshlyPressed.getBlogs($scope);
$scope.$broadcast('scroll.refreshComplete');
};
$scope.doRefresh();
});
Here is the app so you can see what I talk about http://development.urbanetradio.divshot.io/#/, try testing it in a desktop and then in your mobile.
so what is going on ?
