Angular 2 : How To Clear The Dropdown And Textbox Values While Switching The Radio Buttons
UI shows two radio buttons, one is YES and one is NO, if user clicks YES radio then I am showing dropdown and if he clicks NO then showing textbox, now how to clear the dropdown an
Solution 1:
<input type="radio" [(ngModel)]="radioValue" (ngModelChange)="reset()" value="yes"/>yes
<input type="radio" [(ngModel)]="radioValue" (ngModelChange)="reset()" value="no"/>no
reset() {
this.inputsic = '';
this.current = null;
}
Post a Comment for "Angular 2 : How To Clear The Dropdown And Textbox Values While Switching The Radio Buttons"