Suppose my component is managing an instance of the following class:
class Person {
firstName: string;
lastName: string;
age: number;
}
Is there a way to directly reference its properties in the template like this:
<p>{{firstName}}</p>
<p>{{lastName}}</p>
<p>{{age}}</p>
Without having to specify the variable name each time ({{person.firstName}}
, etc)?