Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Angular 2 user input


May 08, 2021 Angular2


Table of contents


Describe

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

S.N. Events and descriptions
Binding to User Input Events When you click it with the Angular event binding, the user can enter text or display text values.
User Input from $event Object You can display the input value by binding the keyup event and display the text back to what the user typed on the screen.
User Input from Local Template Variable You can use local template variables to display user data.
Key Event Filtering The user can display the data for the input box by pressing the Enter key on the keyboard.
On Blur Event You can blur the input value by clicking the mouse outside the input box on the page.

Related articles

DOM events