app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
showToast:boolean = false;
onClick(){
this.showToast = true;
}
}
app.component.html
<h4 style="padding-top:25px; padding-bottom:25px;">
Angular Bootstrap - How to show Toast message
</h4>
<button (click)="onClick()">Show Toast</button>
<br/><br/>
<ngb-toast
*ngIf="showToast"
header="Sample Toast"
[autohide]="false"
(hidden)="showToast=false">
Simple closable static toast with a header.
</ngb-toast>


- angular bootstrap - How to use Collapse
- angular bootstrap - How to use Rating
- angular bootstrap - Rating hover event
- angular bootstrap - Readonly & editable Rating
- angular bootstrap - Progressbar maximum value
- angular bootstrap - How to show striped Progressbar
- angular bootstrap - Light & dark Progressbar
- angular bootstrap - How to use Popover
- angular bootstrap - Open Popover on mouse hover
- angular bootstrap - Open close Popover on button click
- angular bootstrap - Popover manual triggers
- angular bootstrap - Popover custom CSS class
- angular bootstrap - Popover shown & hidden event
- angular bootstrap - Timepicker without spinner
- angular bootstrap - Timepicker custom steps