angularjs - Angular - getting data with a factory -
i'm modifying way app gets it's data. the app got data on page load this <script> var entries = <?php echo $this->entriesdata; ?>; </script> and in angular controller $scope.entries = entries; requirements changed user able go forward or backward 1 week added factory app supposed load data when page loads , refresh data when changeweek() fired. according console factory (loaddata) fires when page loads , again on changeweek() , data comes down server expected. problem view doesn't display data. i'm assuming i'm not returning data $scope.entries correctly. please! var timeentry = angular.module('timeentry', ['ui.select2']); timeentry.factory('loaddata', function($http){ var url = 'index/getentries'; var returndata = ''; var factory = {}; factory.getdata = function(sdate, edate){ $.post(url, {week_start: sdate, week_end: edate}) .done(function(json, textst...