Learn Angular: Angular Event Binding

Описание к видео Learn Angular: Angular Event Binding

Want to learn Angular? In this video, "Learn Angular: Responding to Events with Angular Event Binding", we will learn how to use events in Angular.

One of the primary functions of an application is to respond to user interactions using events. In Angular 9, we use DOM events. In order to invoke code in response to the execution of an event in an Angular application, we want to use Event Binding. Event Binding allows us to provide a template statement that should be executed when the bound event is invoked.

The syntax for an Angular Event Binding is as follows:

(eventName)="templateStatement"

templateStatement(){
//your code goes here
}

Simply wrap the DOM event name in open/close parenthesis and set the value equal to a method you define in your component class.

For a list of common event names, see the angular event documentation.

https://developer.mozilla.org/en-US/d...

"Desktop to Web: A WPF Developers Guide to Learning Angular" is a video tutorial series that will help you take your WPF and WinForms desktop coding skill to the web with Angular. This series will help you understand how your current desktop skills map directly to concepts in Angular to make your learning path to the web as easy and painless as possible.

During each video in this series I will be giving away a one year subscription to Infragistics Ultimate valued at $1,995 USD. Simply subscribe to my channel, like the video, and leave a comment to be entered. Winners are announced in the next video in the series.

Official contest rules: http://brianlagunas.com/desktop-to-we...

The Prize: https://www.infragistics.com/products...

Follow Me:
Twitter:   / brianlagunas  
Blog: http://brianlagunas.com
GitHub: https://github.com/brianlagunas

My Prism Project:
Prism Library: http://prismlibrary.github.io/
Become a Patron:   / prismlibrary  

UPDATE: And the winner is... Matteo Barbieri!

Комментарии

Информация по комментариям в разработке