Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a text box that changes value based on mousewheel. (increments/decrements numbers in it)

I achieve this via jquery.

But Angular doesn't respond to the changes made via jquery.

<input ng-model='data'></input> {{data}}

http://jsfiddle.net/Xxw8N/

Only works if I manually enter the value.

Is there a way to have Angular respond to jquery changing the input value?

share|improve this question
add comment

1 Answer

You don't need jquery if you use angular. In fact jquery just gets in the way of angular. If you must use jquery you need to trigger scope digest manually. If (!$scope.$digest) {$scope.$apply} If it happened outside of angular scope, it won't trigger angular watch.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.