Trying to use the dropdown list. But i cant get interpolation working with templates.
public data: { [key: string]: Object }[] = [
{ Name: 'Andrew Fuller', Eimg: '7', Designation: 'Team Lead', Country: 'England' },
{ Name: 'Anne Dodsworth', Eimg: '1', Designation: 'Developer', Country: 'USA' }
];
public fields: Object = { text: 'Name', value: 'Eimg' };
<ejs-dropdownlist id='employees' [dataSource]='data' [fields]='fields' [itemTemplate]="itemTemplate">
<ng-template #itemTemplate let-data>
<div><div class="ename"> {{data.Name}} </div></div>
</ng-template>
</ejs-dropdownlist>
----------------
- With the above dropdown opens but all the items are empty
- If i add <div><div class="ename"> {{data.Name}} </div> <span>TEST HERE</span></div>, it will render the "TEST HERE" only (interpolation is empty)
- if i remove the item template, and make the data to a list of string, it renders fine
- seems like the interpolation is messed up, or the let variable is not being set
These are the current imported modules
[ButtonModule, DropDownListModule, DialogModule, AccordionModule, TooltipModule, DatePickerModule, UploaderModule];
These are the the npm package imports
"@syncfusion/ej2-angular-buttons": "~16.3.21",
"@syncfusion/ej2-angular-dropdowns": "~16.3.21",
"@syncfusion/ej2-angular-navigations": "~16.3.21",
"@syncfusion/ej2-angular-popups": "~16.3.21",
"@syncfusion/ej2-angular-calendars": "~16.3.21",
"@syncfusion/ej2-angular-inputs": "~16.3.21",