From the course: Learning Angular

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using properties

Using properties - Angular Tutorial

From the course: Learning Angular

Start my 1-month free trial

Using properties

- [Narrator] You can modify properties of an HTML element using an Angular directive called properties. Now you can use the properties syntax, which uses square brackets to help you manage how data affects your code. You can replace any HTML tag property, and that can bind to a property of your component code. We'll take a look at an example in just a minute. Now, you may notice that you can do some of these things by using expressions, but properties can makes sure that it doesn't have loading issues, and that it's not processed before a component has been initialized, also called instantiated. So let's take a look at how that works. So in the assets folder, I have added an images folder, with some additional images. Depending on how you installed this course files, you may need to go back into the terminal and make sure that you are in the proper branch. So I'm going to issue a git stash command, and a git checkout, and I'm going to do 0204, and then hit return. If you did make any…

Contents