我正在显示如下推文列表:
<div ng-controller="NewsFeedCntrl">
<ul>
<li ng-repeat="item in items">
<span ng-bind="item.text"></span>
</li>
</ul>
</div>
angular.module('app').controller('NewsFeedCntrl', function ($scope, $http) {
var id = 0;
function update() {
$http({
method : 'GET',
url : '/_/modules/logs?name=twt&key=' + id
}).success(function (data) {
if (0 < data.length) {
id = data[0].id;
}
setTimeout(function () {
$scope.$apply(function () {
$scope.items = data.concat($scope.items).slice(0, 1000);
});
}, 0);
});
}
$scope.items = [ ];
update();
setInterval(update, 5000);
});
显示原始推文数据,即可。所以现在我想装饰(可能过滤)数据,以便显示可点击的链接,附加信息等。如何以“角度方式”进行此操作?