Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on ajax loaded data? #66

Closed
cyrusdavid opened this issue Nov 3, 2013 · 2 comments
Closed

Does not work on ajax loaded data? #66

cyrusdavid opened this issue Nov 3, 2013 · 2 comments

Comments

@cyrusdavid
Copy link

Hi, I made a plunk here

<body ng-app="main" ng-controller="DemoCtrl">
    <smart-table rows="users"></smart-table>
</body>
app.controller('DemoCtrl', function($scope, $http) {
  $scope.users = [];

  $http.get('https://api.github.com/gists/7295839')
    .then(function(res) {
      $scope.users = JSON.parse(res['data']['files']['users.json']['content']);
      console.log('$scope.users =', $scope.users);
    });
});
@lorenzofox3
Copy link
Owner

Hello,

It seems like a bug. However there is an easy workaround: you won't have the issue if you specify the column configs even if no data are loaded yet, see the plunkr

Laurent

@cyrusdavid
Copy link
Author

Hmm the workaround works, thank you @lorenzofox3 😍

This is a bug then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants