Within my select box, I am capturing the selected value and binding it to the variable startingYear
. However, I need the type of startingYear to be a number, but it is currently registering as a string.
Is there a way to convert it to a number?
console.log(StartingYear);
<select [(ngModel)]="StartingYear">
<option *ngFor="let item of [0,1,2,3,4]; let i = index">
{{i}}
</option>
</select>