-
Notifications
You must be signed in to change notification settings - Fork 480
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
dtInstance not initialized correctly #345
Comments
The functions are inside |
HTML
|
I made a pen that does what you want. |
I ran into this problem myself. I tried the pen and it did work. So I think what is happening based on some of the other angular things I've used is that the datatable directive is actually making its own scope, so if you do the following in your controller...
....and then in your HTML...
...it seems to work. If this is intended, it should probably be made more clear in the documentation. |
I can attest that what @rosshays said is true. If your controller is nested inside another controller, you must use a nested scope or dtInstance will not work properly. |
Can you edit this pen to reproduce your issue? |
I experienced this exact problem and realized that when setting up |
Thanks @rosshays!! Your code solved my problem. |
Thanks @rosshays :) |
I have modified datatables to new version 0.4.3 and i want to use
$scope.dtInstance.reloadData()
. But my object dtInstance is initialized like this:$scope.dtInstance.reloadData()
, no error is show. It looks like that method works (but dont reload data) even if that method is not in object.$scope.dtOptions.reload = true
, it reload data (and dont throw error again)The text was updated successfully, but these errors were encountered: