Issue with DropDownList in angular

30 Views Asked by At

I want to use DropDownList in my Angular app, but I always encounter the same error: NG8002: Can't bind to 'dataSource' since it isn't a known property of 'ejs-dropdownlist'.

If 'ejs-dropdownlist' is an Angular component and it has 'dataSource' input, then verify that it is part of this module. If 'ejs-dropdownlist' is a Web Component, then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. To allow any property, add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

Here are the steps I have taken:

  1. I have installed @syncfusion/ej2-angular-dropdowns.
  2. I have imported the DropDownList module into my Angular application (app.module.ts).
  3. I have modified the HTML file accordingly.
1

There are 1 best solutions below

0
codewithharshad On

Using

ng select for dropdown . its best for angular

I gave demo link

https://stackblitz.com/edit/ng-select