Event Binding
Explore how to listen for and handle events in Angular templates using event binding syntax. Learn to connect user interactions like button clicks to component class methods to build dynamic and interactive web applications.
We'll cover the following...
We'll cover the following...
In this lesson, we’re going to learn about template syntax. Templates in Angular are the HTML in your application, i.e., the presentation part of the application. We’re not limited to tags and attributes in a template. There’s additional syntax available to make the template more dynamic.
The template for the application can be found in the src/app directory under the file name app.component.html. It’ll contain the following:
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- * * * * * * * * * Delete the template below * * * * * * * * * * -->
<!-- * * * * * * * to get started with your project! * * * * * * * * -->
<!-- * * * * * * ...