angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

Angular 1.6

Open ravtakhar opened this issue 9 years ago • 16 comments

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!

ravtakhar avatar Dec 09 '16 17:12 ravtakhar

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.

ravtakhar avatar Dec 11 '16 03:12 ravtakhar

Yeah, this should be documented somewhere. Angular 1.6.0 does not work.

miparnisari avatar Dec 13 '16 23:12 miparnisari

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);

Greenek avatar Dec 14 '16 15:12 Greenek

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.

ravtakhar avatar Dec 14 '16 15:12 ravtakhar

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 avatar Dec 14 '16 15:12 zbjornson

@zbjornson I'm not telling to change it in the library :) It was a tip for @ravtakhar how he can temporarly fix the problem.

Greenek avatar Dec 14 '16 15:12 Greenek

I know :-) but ravtakhar replied that he/she would submit a merge request, which I assumed meant a PR to this lib.

zbjornson avatar Dec 14 '16 15:12 zbjornson

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.

ravtakhar avatar Dec 14 '16 15:12 ravtakhar

(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 avatar Dec 14 '16 15:12 zbjornson

@zbjornson thanks dude really appreciate it!

ravtakhar avatar Dec 14 '16 15:12 ravtakhar

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 avatar Dec 14 '16 20:12 amcdnl

@amcdnl the PR that @jonshaffer prepared (#259) looks good; have you had a chance to review it?

zbjornson avatar Jan 06 '17 19:01 zbjornson

Any updates on this potentially getting merged?

arahlf avatar Mar 28 '17 17:03 arahlf

Any updates on the merge @amcdnl?

david-gurley avatar Apr 26 '17 17:04 david-gurley

ping @amcdnl

macstr1k3r avatar Nov 02 '17 10:11 macstr1k3r

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.

ravtakhar avatar Nov 07 '17 21:11 ravtakhar