I would like to use the rowData var which is declared in my second HTML line in line 1. For now I obviously get the "Property 'rowData' does not exist on type 'AppComponent'" error in line 1. rowData in the fourth line is working as expected. Is there a way to use a var which isn't declared yet? Something like a placeholder or something? I am using Angular (HTML and Typescript) with PrimeNG.
HTML:
...
<p-table selectionMode="single" (onRowSelect)="onRowSelect(rowData)>
<ng-template pTemplate="body" type="default" let-rowData let-columns="columns">
<tr [pSelectableRow]="col">
<td><icon (click)="openComponent(rowData)"></td>
...