kirstein / angular-autodisable

ngAutodisable directive for angular. Automatic disable for buttons rocks!
http://jsfiddle.net/kirstein/wXnks/embedded/result/
MIT License
63 stars 26 forks source link

recompile element inside apply #11

Closed cjroth closed 9 years ago

cjroth commented 9 years ago

I had an issue where the element was not being updated with the disabled attribute or class because elementToDisable was not referencing the current element in the scope $apply. This fixed it.

This was occurring with Angular 1.3.8.

Not sure, but it also sounds like it could be related to #10 since ng-if creates its own child scope.

kirstein commented 9 years ago

Hey! Could you please add a test case for the issue at hand?

mburgosh commented 9 years ago

The tests I added fails to expose this issue. I have to admit that I'm not completely familiar with the cause (some doc would be useful).

If you can inspire from the tests, please modify them. If not revert them.

kirstein commented 9 years ago

Those tests seem perfectly ok. Please include them in this PR and I will merge it.

mburgosh commented 9 years ago

I checked out the PR master and ran the tests, and they fail.