View difference between Paste ID: Vfq5mdxF and nzS3CcFY
SHOW: | | - or go back to the newest paste.
1-
// my app is using tabs, everytime the user moves away from the tab and goes back to it, i want the content to refresh but currently its not working.  At the same time, i want to give the user a button to force a refresh, but that too is not working:
1+
/* my app is using tabs, everytime the user moves away from the tab and goes back to it, i want the content to refresh but currently its not working.  At the same time, i want to give the user a button to force a refresh, but that too is not working.  A) I am creating the "doRefresh" function to both be called for auto refresh and for when the user clicks the button, however I am getting the following error upon execution: doRefresh is not defined 
2
*/
3-
    .controller('TabsCtrl', function($scope,$http,Tabs) {
3+
4-
        $scope.tabs= Tabs.all();
4+
.controller('TabsCtrl', function($scope,Tabs) {
5-
        $scope.remove = function(tab) {
5+
    $scope.tabs= Tabs.all();
6-
          Tabs.remove(tab);
6+
    $scope.doRefresh = function() {
7-
        }
7+
      $scope.tabs= Tabs.all();
8-
        function doRefresh($scope,$http,Tabs) { <== doesn't work
8+
    }
9-
          $scope.tabs= Tabs.all();
9+
})