Angular 2 User Input - Angular 2

How user input works in Angular 2?

Description

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.

S.N.

Event & Description

1

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

2

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.

3

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

4

Key Event Filtering

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

5

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 DMCA.com Protection Status

Angular 2 Topics