From the course: Angular Essential Training

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Structural directives in Angular templates

Structural directives in Angular templates - Angular Tutorial

From the course: Angular Essential Training

Structural directives in Angular templates

- [Instructor] Earlier in this course, we looked at using template reference variables and data binding inside component templates to make content dynamic and interactive. In this video, we'll look at using structural directives to add and remove content in the DOM. I opened our project here in a GitHub code space. I talked about why we use code spaces earlier in this course. So for now, just think of them as an easy way to share and write code without installing anything on your local machine. Let's take a look at the HTML template for one of our components. I'll go to the source folder. Open up the app folder, pages, players, and click on players.component.html to open the file. Always use the component.html ending for the file names for your component templates. The Angular CLI tool does this for you when you generate new components using the NG generate component command. You can use any valid HTML for a component's…

Contents