×

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:28 PM
Modified: Jul 3, 2017 8:14 AM
Views: 5
Tags: no tags
  1. this.disbmtPhotoStatusList = [
  2.             {id: 'Pending', name: "Pending"},
  3.             {id: 'Confirmed', name: "Confirmed"}
  4.         ];
  5.    
  6. selectedValue = this.disbmtPhotoStatusList[0];  
  7.  
  8.  onInput($event) {
  9.        
  10.         console.log(this.disbmtPhotoStatusSelected);
  11.      
  12.     }
  13.  
  14. ------------- inside template -------------------
  15.  
  16. <div class="form-group">
  17.             <label for="Status" class="col-sm-3 control-label">Disbursement Record Status</label>    
  18.             <div class="col-sm-7">
  19.                 <select [(ngModel)]="disbmtPhotoStatusSelected"  (input)="onInput($event)" name="disbmtPhotoStatusList">
  20.                     <option *ngFor="let dpsl of disbmtPhotoStatusList" [ngValue]="dpsl">{{dpsl.name}}</option>
  21.                 </select>
  22.             </div>
  23. </div>