angularJS with ng-table is not loading data on returning to listing from detail page
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.
Not enough informaton. Provide all your code with templates.
@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?
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