Cannot find module ‘ngx-bootstrap’

Based on ngx-bootstrap documentation, angular 9 doesn’t support this kind of import . If you want to use BsModalService , ButtonsModule and so on you have to import them as below : // RECOMMENDED import { BsModalService, BsModalRef } from ‘ngx-bootstrap/modal’; import { ButtonsModule } from ‘ngx-bootstrap/buttons’; instead of : // NOT RECOMMENDED import { … Read more

difference between ngx-bootstrap and ng2 bootstrap?

Since Angular2 is released, many components are published as npm modules and most them have prefix – ng2- or angular2- like ng2-bootstrap, angular2-tags-input. After releasing Angular4, all those node modules were faced with serious problem – “Do we have to be renamed to ng4 or angular4???” Here is an answer written by Igor Minar from … Read more

ngx-bootstrap modal: How to get a return value from a modal?

Try like this : myexample it’s working correctly. hope this will help you home.module.ts import { ModalModule } from ‘ngx-bootstrap’; @NgModule({ imports: [ ModalModule.forRoot() ] }) home.component.html <button class=”btn btn-primary” (click)=”openConfirmDialog()”>Open Confirm box </button> home.component.ts import { BsModalService } from ‘ngx-bootstrap/modal’; import { BsModalRef } from ‘ngx-bootstrap/modal/modal-options.class’; export class HomeComponent { public modalRef: BsModalRef; constructor( … Read more

What is the difference between “ng-bootstrap” and “ngx-bootstrap”?

ng-bootstrap and ngx-bootstrap are two different projects by two different project teams that are trying to accomplish more or less the same thing – allowing you to use Bootstrap in Angular (2+) without the use of jQuery. They are both rebuilding the Bootstrap components using only Angular (no jQuery).The main differences are around which version … Read more

How to add bootstrap to an angular-cli project

IMPORTANT UPDATE: ng2-bootstrap is now replaced by ngx-bootstrap ngx-bootstrap supports both Angular 3 and 4. Update : 1.0.0-beta.11-webpack or above versions First of all check your angular-cli version with the following command in the terminal: ng -v If your angular-cli version is greater than 1.0.0-beta.11-webpack, then you should follow these steps: Install ngx-bootstrap and bootstrap: … Read more