ng-table
ng-table copied to clipboard
Calling reload() before rendering the directive produces error
Let's say I create an ngTableParams object in my controller with the intention of passing it to the ng-table directive in the view. Now let's say that, before that happens (still in the controller) I happen to call reload() on the object. This will produce an error because the local $scope used inside the reload function doesn't exist yet.
So, maybe I shouldn't be calling reload() when the thing hasn't even been rendered yet but I can, so I might then the error should be avoided if possible.
You can use $scope.$evalAsync or $timeout to wait for table rendering.