Exploring Angular 2 and TypeScript
Is there a way to use (click)="functionA()"
within an <option>
tag?
I've tried the following code but it doesn't seem to work.
<select class="form-control">
<option>1</option>
<option (click)="functionA()">2</option>
<option>3</option>
</select>
What about trying this approach instead:
<select class="form-control">
<option>1</option>
<option><a (click)="functionA()"><a>2</option>
<option>3</option>
</select>