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.

What event does angularjs use to get a value from text input? I thought it's oninput or onchange.

share|improve this question
    
Do you come from a jQuery background ? To get a value from a text input, angularjs uses ng-model. I suggest you look up angularjs basics such as double binding. –  Komo 17 hours ago
    
I am not about basics. I want to know What way does angularjs use to get a value? –  iDennis 17 hours ago
    
it's every keypress. For every keypress the scope changes. –  gerl 17 hours ago
    
Please, give an example of event. –  iDennis 16 hours ago

1 Answer 1

  1. If the input event is supported and not IE9
    listen for the input event
    otherwise listen for the keydown, paste, cut events

  2. Listen for the change event

share|improve this answer

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.