0

I want to select a value in a dropdown list made of years from 2015 to the current year:

<select (change)="changeDate()">
      <option  *ngFor="let exercice of exercices" (ngModel)="selectedExercise" 
      [value]="exercice">{{exercice}}</option>
</select>

I have in my model the variable "selectedExercise : number", and I want it to dynamically take the value of my select. I found this post : How to dynamically bind the value of a checkbox Angular 2 Interesting, but I don't understand the "#" elements. Does anyone have a solution and eventually a better documentation about these "#" than : https://angular.io/docs/ts/latest/guide/template-syntax.html#!#ngModel ?

Thank you for reading

Community
  • 1
  • 1
Callehabana
  • 95
  • 2
  • 14

0 Answers0