<tr (click)="onRowClick(myDropDownList.value)">
<td>
<select #myDropDownList (click)="$event.stopPropagation()" (change)="onChange($event.target.value)">
<option *ngFor="let n of numbers" [value]="n">{{n}}</option>
</select>
</td>
</tr>
I was trying to get selected value from the drop down list and assign it to the onRowClick
function. But myDropDownList
always appears to be undefined
for some reason. I was wondering what might go wrong here.