The official documentation for ngx-bootstrap is Alerts .
The official documentation for ngx-bootstrap is Modals .
API documentation and usage scenarios available there with practical examples.
For quick reference, I will give you the code for a simple alert window - Use and demo below:
First of all, import ngx-bootstrap into your root module using:
import { AlertModule } from 'ngx-bootstrap'; @NgModule({ imports: [AlertModule.forRoot(),...] }) export class AppModule(){}
Here is the part of the HTML template :
<alert type="success"> <strong>Well done!</strong> You successfully read this important alert message. </alert>
The code for Component listed below:
import { Component } from '@angular/core'; @Component({ selector: 'demo-alert-basic', templateUrl: './basic.html' }) export class DemoAlertBasicComponent {}
Manubhargav
source share