Reputation: 393
I have installed ngx bootstrap in Angular 10 Project using following npm command, I am using scss in my Angular
npm i ngx-bootstrap
but after install when I used bootstrap codes here it is not working properly. how could I fix this problem?
Upvotes: 0
Views: 1298
Reputation: 503
Use the Angular CLI ng add command for updating your Angular project.
ng add ngx-bootstrap
Or use ng add to add needed component (for example tooltip).
ng add ngx-bootstrap --component tooltip
Add component to your page:
<button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
</button>
Upvotes: 0
Reputation: 356
You will need bootstrap styles:
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
Add needed package to NgModule imports:
import { TooltipModule } from 'ngx-bootstrap/tooltip';
@NgModule({
...
imports: [TooltipModule.forRoot(),...]
...
})
https://www.npmjs.com/package/ngx-bootstrap
Upvotes: 0