Need help passing a variable from a template to typescript using *ngFor loop.
Currently, my code looks like this:
<select (change)="onregionchange()" data-placeholder="Regions" class="form-control regions-select" id="regions" multiple>
<option *ngFor="let region of all_regions" [value]="region.id">{{region.name}}</option>
</select>
I want to send countries for the selected region to the ts file and store them in region.countries within the onregionchange() function.
Any suggestions on how to achieve this in angular2?