Angular 2 User Input - Angular 2

How user input works in Angular 2?


When the user clicks a button and enters some text or clicks a link, these user interactions will trigger DOM events. Below table describes how to bind these events using Angular event binding syntax.


Event & Description


Binding to User Input Events
User can enter text or display the text value by clicking on it using Angular event binding.


User Input from $event Object
User can display the input value by binding keyup event and displays the text typed by the user on to the screen.


User Input from Local Template Variable
User can display the user data using local template variable.


Key Event Filtering

User can display the input box data by pressing 'Enter' key on the keyboard.


On Blur Event
User can make the input value blur by clicking the mouse outside of the input box.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Angular 2 Topics