×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Nilesh Yadav
Added: Jun 18, 2017 6:45 PM
Modified: Jul 4, 2017 11:15 AM
Views: 4
Tags: no tags
  1. public genders = [
  2.     { value: 'F', display: 'Female' },
  3.     { value: 'M', display: 'Male' }
  4.   ];
  5.  
  6.   onworkFlowStatusChange(gender:any) {
  7.         console.log(gender);
  8.   }
  9.  
  10.  <div class="form-group">
  11.       <label>Gender</label>
  12.       <div class="radio" *ngFor="let gender of genders">
  13.         <label>
  14.           <input type="radio" name="gender" [(ngModel)]="user.gender" [value]="gender.value" (change)="onworkFlowStatusChange(gender)">
  15.           {{gender.display}}
  16.         </label>
  17.       </div>
  18.   </div>