how to use ng-multiselect-dropdown without [(ngModel)]

Viewed 47

i am using the ng-multiselect-dropdown with angular 14. i want to use this module with singleSelection without initial data i mean without [(ngModel)] to show placeholder firstly but i got error.this is my code below this is my html code

  <ng-multiselect-dropdown
               [placeholder]="'search the country'" [settings]="dropdownSettings"
               [data]="dropdownList">
  </ng-multiselect-dropdown>

this is typescript code

enter image description here

and i got this error when selecting an option from dropdown

enter image description here

any help will be highly appreciated.

0 Answers
Related