AngularJS passing lastTime to a service to display only recent posts -
i not sure if going right way want achieve twitter feed effect. i have statuses page, on first page load statuses , after display updates on page. i have service calls api: emp.services.socialservice = ['$http', '$q', function ($http, $q) { var deferred = $q.defer(); $http.get('/api/feed').then(function (data) { deferred.resolve(data); }); this.getstatuses = function () { return deferred.promise; }; return { getstatuses: this.getstatuses }; }]; and controller: emp.controllers.statusescontroller = ['socialservice', '$scope', '$interval', function(socialservice, $scope, $interval) { $scope.statuses = []; $scope.lasttime = 0; $scope.refreshstatuses = function() { var statuses = socialservice.getstatuses(); statuses.then(function(data) { $scope.statuses = data.data; for(id in $scope.statuses) { ite...