Angular 1.6
I don't think this works with Angular 1.6
I get over 51 errors now... 'Cannot set property 'scrollBarWidth' of undefined' ... 'Cannot read property columns of undefined' ...
The only thing I did was upgrade from Angular 1.4 to Angular 1.6 [Also checked for an updated version of this data-table]
Thanks!
Just to confirm I took the demo codepen and switched out angular 1.4.7 to angular 1.6.0. Made a small modification to $http.success => $http.then.
I get the same result as my project.
Yeah, this should be documented somewhere. Angular 1.6.0 does not work.
It's because now by default bindings are not pre-assigned in directive/component controller constructors. You can't access them before $onInit is called. More details: angular/angular.js#15352
To switch is back, just call
$compileProvider.preAssignBindingsEnabled(true);
Hopefully I can get to this today then... Not in the office. Thank you so much for a solution! I will submit a merge request when I can.
Unfortunately that's not something that should be put in this (or any other) library.
Don't do this if you're writing a library, though, as you shouldn't change global configuration then.
-from https://github.com/angular/angular.js/blob/master/CHANGELOG.md#breaking-changes
Any bindings used in a controller outside of a method needs to now go in $onInit, which wasn't introduced until Angular 1.5 and will thus be a breaking change for this lib. Not sure what the maintainers want to do with that since this lib is 0.x.x still.
@zbjornson I'm not telling to change it in the library :) It was a tip for @ravtakhar how he can temporarly fix the problem.
I know :-) but ravtakhar replied that he/she would submit a merge request, which I assumed meant a PR to this lib.
Sorry, I only said that because I thought this was library was dead at this point. "Thank you so much for a solution." I don't know if someone is willing to tweak and fix the issue properly. I am in no rush though, I have a merge request pending with changes for 1.6 for another project... waiting on this library at the moment.
(no worries, sorry if I sounded harsh)
Unless someone gets to it before me, I'll work on a fix sometime soon, and worst case (if it doesn't get merged) will keep it as a fork.
@zbjornson thanks dude really appreciate it!
If someone want to make a PR for this, i'll accept it :) ... its not dead, we still use it internally just not making any big changes since we are doing the ng2 version mainly now.
@amcdnl the PR that @jonshaffer prepared (#259) looks good; have you had a chance to review it?
Any updates on this potentially getting merged?
Any updates on the merge @amcdnl?
ping @amcdnl
This issue has been open for a while. I don't think the original author is going to be merging it in...
I just went to @zbjornson 's branch and imported the changes into my project.