angular - how to display object value of multiselect primeng angular2 -
i following https://www.primefaces.org/primeng/#/multiselect docs have information print value of string. how can display object value. this.cities.push({label:'new york', value:{id:1, name: 'new york', citycode: 'ny'}});
instance want display code. tried {{selectedcity.citycode}} displaying [obj obj]
since selectedcity
array, should use *ngfor
loop through items.
<div *ngfor="let city of selectedcities"> <p>{{city.id}}. {{city.citycode}} - {{city.name}}</p> </div>
Comments
Post a Comment