Javascriptservices: No provider for NgbTooltipConfig!

Created on 25 Feb 2017  路  1Comment  路  Source: aspnet/JavaScriptServices

Hi, I would like to use ng-bootstrap but I'm getting an error message:

Unhandled Promise rejection: Error in ./HomeComponent class HomeComponent - inline template:0:0 caused by: No provider for NgbTooltipConfig! ; Zone: angular ; Task: Promise.then ; Value:

I tried add it in few steps:

  1. Install by -> npm install --save @ng-bootstrap/ng-bootstrap
  2. Add -> '@ng-bootstrap/ng-bootstrap/bundles/ng-bootstrap.js' to webpack.config.vendor.js (entry -> vendor section)
  3. Run -> webpack --config webpack.config.vendor.js
  4. Import -> import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; in app.module.ts
  5. Add -> NgbModule (@NgModule > import section)
  6. In my package.json I have a line: "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.20"

I was trying to test it by:

<button type="button" class="btn btn-secondary" placement="top" ngbTooltip="Tooltip on top">
    Tooltip on top
</button>

Do you have any idea what is wrong?

Most helpful comment

You should import NgbModule.forRoot() not NgbModule.

>All comments

You should import NgbModule.forRoot() not NgbModule.

Was this page helpful?
0 / 5 - 0 ratings