all i want is to build a simple RSS Application. the app so far working fine on the browser but when i try build this into my phone the whole rss part is disappear. im using angular on the ionic-yeoman framework.
my service:
'use strict';
angular.module('RedColor.services', [])
.factory('myService', function($http) {
return {
getFoo: function() {
// since $http.get returns a promise,
// and promise.then() also returns a promise
// that resolves to whatever value is returned in it's
// callback argument, we can return that.
return $http.jsonp('//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=50&callback=JSON_CALLBACK&q=http://www.ynet.co.il/Integration/StoryRss1854.xml');
}
}
});
my Controller:
.controller('PlaylistsCtrl', function(myService,$scope) {
myService.getFoo().then(function(data) {
// this will execute when the
// AJAX call completes.
$scope.playlists = data.data.responseData.feed.entries;
console.log(data);
});
})
my HTML:
<ion-content class="has-header">
<ion-list>
<h2 align="right">מבזקים</h2>
<ul align="right">
<li ng-repeat="playlist in playlists">{{playlist.title}}</li>
</ul>
<ion-item align="right" class="item-icon-right" ng-repeat="playlist in playlists track by $index" href="#/app/playlists/{{playlist.id}}">
{{playlist.title}}
</ion-item>
</ion-list>
</ion-content>
Try putting http before the Google api:
return $http.jsonp('http://ajax.googleapis.com/ajax/services/feed/load...');