1

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.