<div ng-repeat="item in filteredList">
<h4><a href="{{item.link}}" target="_blank">{{item.title}}</a></h4>
<div style="color: #777; font-size: 13px;">
<span class="">{{item.publishedDate}}</span>
<span class="">{{item.source}}</span>
</div>
<div class="lead" style="font-size: 16px; padding-top: 5px;">
<p>{{item.content}}</p>
</div>
<hr class="divider"/>
</div>
for (var i = 0; i < feedSources.length; i++) {
if (feedSources[i].enabled) {
FeedLoader.fetch({
q: feedSources[i].url,
num: 100
}, {
v: '1.0',
callback: 'JSON_CALLBACK'
}, function(data) {
var feed = data.responseData.feed;
//console.log(feed.entries);
//feed.title.replace('Новости на Slon.ru','Слон');
console.log(feed.title);
if (assocNames[feed.title]) {
feed.title = assocNames[feed.title];
}
for (var z = 0; z < feed.entries.length; z++) {
/*feed.entries[z].content = feed.entries[z].content;*/
//feed.entries[z].publishedDate = Date.parse(feed.entries[z].publishedDate);
//feed.entries[z].publishedDate = dateFormat(new Date(feed.entries[z].publishedDate),'dd.mm.yyyy HH:mm');
var d = new Date(feed.entries[z].publishedDate);
feed.entries[z].publishedDate = dateFormat(d, 'dd.mm.yyyy HH:MM');
feed.entries[z].source = feed.title;
feed.entries[z].id = c;
feed.entries[z].worker = workers[rnd(0, workers.length)];
feed.entries[z].content = strip(feed.entries[z].content);
feed.entries[z].content = '';
list.push(feed.entries[z]);
c++;
}
//feeds.push(feed);
//console.log(list);
loaded++;
if (loaded == countloading) {
loading = false;
document.getElementById('loadinggif').style.display = 'none';
}
});
}
}
.factory('FeedLoader', function ($resource) {
return $resource('http://ajax.googleapis.com/ajax/services/feed/load', {}, {
fetch: { method: 'JSONP', params: {v: '1.0', callback: 'JSON_CALLBACK'} }
});
})