My purpose is use the enum to read a array's property. This code gives me error:
<ng-container *ngFor="let elem of list">
<div class="ui-g-12 ui-sm-12 ui-md-12 ui-lg-12 ui-xl-12">
<div class="ui-g-12 ui-sm-12 ui-md-12 ui-lg-3 ui-xl-3">
<input type="text" pInputText value="{{elem[StudentEnum.name] }}" name="student_name" />
</div>
</ng-container>
StudentEnum is a enum class, but if i put in the template it doesn't work. What is the correct method to read array properties and values using a enum in a template?
{{ elem[StudentEnum.name] }}