ng-table icon indicating copy to clipboard operation
ng-table copied to clipboard

angularJS with ng-table is not loading data on returning to listing from detail page

Open sanjayhub opened this issue 11 years ago • 3 comments

I am using angular JS with ng-tables with rails as an API. i successfully integrated ng-tables with server side pagination. The issue i am facing is whenever i go back list page from detail page. table data is not visible. i checked in logs and using breakpoints . i can see data but not lucky.

my controller is sampleController.js

function sampleController($scope, $http, ngTableParams, $state, Auth) { $data = []; $scope.tableParams = new ngTableParams({ page: 1, count: 10 }, { getData: function($defer, params) { $http.get('sample.json', { params: { page: params.page() } }) .success(function(response, status) { $data = response.data; params.total(response.count); $defer.resolve($data); }); } }); I appreciate your time and input. Hoping for solution from you guys.

sanjayhub avatar Dec 25 '14 15:12 sanjayhub

Not enough informaton. Provide all your code with templates.

maxaon avatar Dec 26 '14 20:12 maxaon

@sanjayhub could you also format your issue? I'm also not sure a github issue is the best forum for these types of questions. Could you close this and post your question to StackOverflow?

Nate-Wilkins avatar Dec 27 '14 00:12 Nate-Wilkins

hi Nate-wilkins, i figured out the issue after debugging for 1 hour . this problem was in entire project. then i removed //= require turbolinks from application.js and uninstalled gem . worked like a charm. I posted in stackoverflow as well. thank you

sanjayhub avatar Dec 27 '14 13:12 sanjayhub