typescript - Angular 2 : form, when book option, start and end date are not needed -
html:
<md-select placeholder="type" required [(ngmodel)]="request.type" (ngmodelchange)="valuedateneeded()"> <md-option *ngfor="let type of requesttypes" [value]="type.value"> {{type.name}} </md-option> </md-select>
i want value of option chosen. link valuedateneeded() can set true or false depending on value , can show or not show div.
you need use [(ngmodel)]
example
component.ts
public variablestore: any;
component.html
<select [(ngmodel)]="variablestore"> <option value="1">1</option> </select
the value inside variablestore
Comments
Post a Comment