Closed abhinavsachdeva2701 closed 6 years ago
@abhinavsachdeva2701 You can use data attribute for local data refer Link
--- html ---
<amexio-dropdown [field-label]="'Only one answer'" name ="onlyOneAnswer" [(ngModel)]="onlyOneAnswer" [display-field]="'name'" [value-field]="'id'" [data]="enumTriStateCombo()"
--- typescript ---
export class ComboInfo{ id:string; name:string; }
/ YesNo - No / Yes -> (0 / 1) /
public enumYesNoCombo(){
return this.enumYesNo;
}
enumYesNo:Array
{id:'1',name:'Yes'} , {id:'0',name:'No'} ];
Hi @baminmru [data] attribute takes input as Array or Object. your code should be like this <amexio-dropdown [field-label]="'Only one answer'" name ="onlyOneAnswer" [(ngModel)]="onlyOneAnswer" [display-field]="'name'" [value-field]="'id'" [data]="enumYesNo"
[data]="enumYesNo()"
enumYesNo is function returning array, not property
Thanks Team, I was able to get it working !!
I'm submitting a...
Current behavior
Right now, when I pass REST API Url in the amexio dropdown in http-url property, the dropdown populates with values.
Expected behavior
Is it possible to populate dropdown without using http-url. What i want to do is define the REST API url in Angular Service and then i want to populate the values in dropdown.
Minimal reproduction of the problem with instructions
For bug reports please provide the STEPS TO REPRODUCE and if possible a MINIMAL DEMO of the problem via https://plnkr.co or similar (you can use Our Amexio Plunker as a starting point: http://plnkr.co/edit/M9AeGH?p=info)
What is the motivation / use case for changing the behavior?
I don't want to pass any rest url in HTML components.
Environment