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:
- I have installed @syncfusion/ej2-angular-dropdowns.
- I have imported the DropDownList module into my Angular application (app.module.ts).
- I have modified the HTML file accordingly.
Using
ng select for dropdown . its best for angular
I gave demo link
https://stackblitz.com/edit/ng-select