Component class properties in Angular template
All public properties of the component class will be available inside the component template. Let's see how to access them.
Let our class have the following public property:
export class AppComponent {
public test: string = 'abcde';
}
Let's display the contents of our property in the layout. To do this, you need to write the name of the property inside double curly brackets:
<div>
{{ test }}
</div>
The following layout is given:
<ul>
<li>name: john</li>
<li>surn: smit</li>
</ul>
Make the first and last name passed to the template from the component class.