Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error NG8002: Can't bind to 'data' since it isn't a known property of 'ng-multiselect-dropdown'. #404

Open
sstephenraj opened this issue Aug 3, 2023 · 8 comments

Comments

@sstephenraj
Copy link

Angular version: 14.2.11

ng-multiselect-dropdown version: 1.0.0

Description of issue: error NG8002: Can't bind to 'data' since it isn't a known property of 'ng-multiselect-dropdown'.

Steps to reproduce:

Expected result:

Actual result:

Demo: Please share sample code link using StackBlitz or codesandbox

Any relevant code:


@ekomut
Copy link

ekomut commented Aug 14, 2023

+1

@Sajeel-18
Copy link

Sajeel-18 commented Aug 25, 2023

same using ng-multi-select on angular 14 getting the same error

error NG8002: Can't bind to 'data' since it isn't a known property of 'ng-multiselect-dropdown'.

  1. If 'data' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.

  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

    [data]="dropdownList"

@mashegoindustries
Copy link

I had similar issue and the below resolved it..... AS PER DOCUMENTATION

`import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
// ...

@NgModule({
imports: [
NgMultiSelectDropDownModule.forRoot()
// ...
]
// ...
})
export class AppModule {}`

@nylon
Copy link

nylon commented Aug 29, 2023

I had similar issue and the below resolved it..... AS PER DOCUMENTATION

`import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
// ...

@NgModule({
imports: [
NgMultiSelectDropDownModule.forRoot()
// ...
]
// ...
})
export class AppModule {}`

Thanks for putting AS PER DOCUMENTATION in caps but unlike the documentation the error occurs when using the component in a custom component.

@aravindmantravadi
Copy link

facing the same issue in Angular 16.

@aksuna
Copy link

aksuna commented Jan 16, 2024

Yeap the same here using in a custom cumponent dont works

Error: src/app/pages/drug/update/drugform/drugform.component.html:48:3 - error NG8002: Can't bind to 'placeholder' since it isn't a known property of 'ng-multiselect-dropdown'.

  1. If 'placeholder' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

48 [placeholder]="'Select Indications'"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app/pages/drug/update/drugform/drugform.component.ts:22:16
22 templateUrl: './drugform.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component DrugformComponent.

Error: src/app/pages/drug/update/drugform/drugform.component.html:49:3 - error NG8002: Can't bind to 'settings' since it isn't a known property of 'ng-multiselect-dropdown'.

  1. If 'settings' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

49 [settings]="indicationDropDownSettings"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app/pages/drug/update/drugform/drugform.component.ts:22:16
22 templateUrl: './drugform.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component DrugformComponent.

@heyitshubham
Copy link

Degrade or upgrade the version of ng-multiselect-dropdown according to angular version specified in DEMO.
Use ng-multiselect-dropdown vs. for angular version 16 and for angular version 15 use this version 0.3.9

@shyambabu-kolipaka
Copy link

Yeap the same here using in a custom cumponent dont works

Error: src/app/pages/drug/update/drugform/drugform.component.html:48:3 - error NG8002: Can't bind to 'placeholder' since it isn't a known property of 'ng-multiselect-dropdown'.

  1. If 'placeholder' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

48 [placeholder]="'Select Indications'" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app/pages/drug/update/drugform/drugform.component.ts:22:16 22 templateUrl: './drugform.component.html', ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component DrugformComponent.

Error: src/app/pages/drug/update/drugform/drugform.component.html:49:3 - error NG8002: Can't bind to 'settings' since it isn't a known property of 'ng-multiselect-dropdown'.

  1. If 'settings' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

49 [settings]="indicationDropDownSettings" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app/pages/drug/update/drugform/drugform.component.ts:22:16 22 templateUrl: './drugform.component.html', ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component DrugformComponent.

@aksuna , You might have multiple modules in your project. You need to import the this module in the correct module where you are using this multislect dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants