Component class properties in Angular attributes
You can display public properties of a class not only in the text of tags, but also as attribute values. Let's look at this in practice. Let's say our class has the following property:
export class AppComponent {
public test: string = 'abcde';
}
Let's output the contents of our property in the tag attribute:
<div id="{{ test }}">
text
</div>
The following layout is given:
<img src="test.png" alt="picture">
Make the attributes content come from the component class.