angular - Angular2 forms - access value in ngIf -
i have a<select #type >
. need reference value of select later on in template inside ngif, how can so?
tried *ngif='type.value!="category"'
, doesn't seem trick..
could bind select model , reference model element?
<select [(ngmodel)]="type"> <!-- options --> </select> <div *ngif="type !== 'category'"> </div>
Comments
Post a Comment