angular-select2 icon indicating copy to clipboard operation
angular-select2 copied to clipboard

NgChange

Open oaugustus opened this issue 11 years ago • 7 comments

Hi,

Great job! I have a question about ng-change, this was implemented?

oaugustus avatar Jan 22 '15 16:01 oaugustus

Nope, not yet.

Would happily merge a pull request for it.

As a workaround, use a scope watch on the variable that you use in the ng-model field.

rubenv avatar Jan 22 '15 16:01 rubenv

Err wait, this might just work automatically. Have you tried it?

rubenv avatar Jan 22 '15 16:01 rubenv

Yes, I try it, but don't work.

oaugustus avatar Jan 22 '15 16:01 oaugustus

Yeh that s not working, Must needde feature

tushar-borole avatar Feb 03 '15 06:02 tushar-borole

Not yet?

tushar-borole avatar Feb 19 '15 20:02 tushar-borole

You can add this:

controller.$viewChangeListeners.push(function() { scope.$eval(attrs.ngChange); });

When you detect changes in select2, right in the $timeout callback. It worked for me. Great work, you saved my life!

xtiam57 avatar Apr 27 '15 22:04 xtiam57

This is working with Angular 1.4.9 and angular-select2 1.5.2. I'm using it normally here, also with all other ng-directives associated with input elements.

mateusleon avatar Jun 15 '16 22:06 mateusleon