Skip to content
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

Support for ng-change #8

Closed
lucasribsantos opened this issue Apr 11, 2016 · 3 comments
Closed

Support for ng-change #8

lucasribsantos opened this issue Apr 11, 2016 · 3 comments

Comments

@lucasribsantos
Copy link

I need support for the ng-change attribute. Right now I'm using $scope.$watch to process changes in the ng-model value, but it doesn't seem like the right thing to do. Am I doing something wrong?

@cohenadair
Copy link
Owner

I don't think you're doing anything wrong.

I'm not an Angular wizard and I haven't used it in a while, but my understanding of $scope.$watch is that it's used to be triggered when something is updated, and in this case it's exactly what you want.

@lucasribsantos
Copy link
Author

Thanks for the reply. My point is that it actually seems more appropriate to have an ng-change method rather than having to manually register a watcher, specially since the directive - in my eyes - should work just like a regular angular input.

The watcher will do for now, it's just a matter of convenience 😄

@cohenadair
Copy link
Owner

Oh I agree, definitely.

I do plan on making some updates this summer since I'm finally done school. I'll be sure to add this to my list.

Cheers!

cohenadair added a commit that referenced this issue Jun 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants