I have one sample with interpolation. It shows drop-down values correctly when is use any one event like below:
sample: click me
code snippet:
Here i have added event (open)="onOpen()"
<ejs-dropdownlist
(open)="onOpen()"
required id="ddlApp" name="ddlApp" [dataSource]='appDataSource' [allowFiltering]='true'
[itemTemplate]="itemTemplate" [valueTemplate]="valueTemplate" [(ngModel)]="dropdownlApp"
#ddlApp="ngModel" [placeholder]='ddlAppText' [fields]='fields'>
sample 2: click me
In this sample i would not add any event, in this case interolation is not working.
Code snippet:
<ejs-dropdownlist
required id="ddlApp" name="ddlApp"
[dataSource]='appDataSource' [allowFiltering]='true'
[itemTemplate]="itemTemplate" [valueTemplate]="valueTemplate"
[(ngModel)]="dropdownlApp" #ddlApp="ngModel"
[placeholder]='ddlAppText' [fields]='fields'>
Just remove
changeDetection: ChangeDetectionStrategy.OnPush
form your@Component
decorator your second sample will workYou component decorator should read as
Bind you object array in
ngOnInit()
it is the right way to bind and right time to bind the values - Thanks, Happy coding !!