Bug description:
Followed the instructions on https://ng-bootstrap.github.io/#/getting-started
Installed ng-bootstrap:
npm install --save @ng-bootstrap/ng-bootstrap
Imported:
import { NgbTypeahead } from '@ng-bootstrap/ng-bootstrap';
Declared:
@NgModule({ declarations: [AppComponent], imports: [NgbTypeahead], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
When running the app I get an error:
Uncaught Error: Unexpected directive ‘NgbTypeahead’ imported by the module ‘AppModule’. Please add a @NgModule annotation.
Versions of Angular, ng-bootstrap and Bootstrap:
Angular CLI: 7.3.5
Angular: 7.2.9
ng-bootstrap:4.1.0
Bootstrap:4.3.1
@NgModule annotation is there, not sure what is wrong! Thank you.
It never says
imports: [NgbTypeahead]
(!) – I guess you’ve meantimports: [NgbTypeaheadModule]