'ng-select' is not a known element
You have to import the NgSelectModule
in the module that declares your ModalTestComponent
, or, if your ComponentsModule
is a wrapper, you should import the module that declares ModalTestComponent
in it; this way:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgSelectModule } from '@ng-select/ng-select';
// add this line
import { ModuleThatDeclaresModalTest } from 'path/to/module'
@NgModule({
imports: [
CommonModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
NgSelectModule,
// and this line
ModuleThatDeclaresModalTest
]
})
export class ComponentsModule { }
As an alternative, as @Narm said, you can import NgSelectModule
in your AppModule
, so that all children modules can use it.