1

If I set an input variable like

input.value = 'Something';

I know I can trigger an update to angularjs via

$(input).trigger('input');

Can I trigger the same event using regular Javascript? Without using jQuery?

1
  • Should be using models if you're using Angular, FYI (deleted answer, felt like more of a comment) Commented Aug 30, 2013 at 14:05

1 Answer 1

1

Yes, You can do it. Try this:

document.getElementsByTagName("input")[0].value = "Something";
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.