Every feedback is welcome!
Install via npm:
$ npm install @benevideschissanga/ngx-bootstrap-alert-notification --save
or yarn:
$ yarn add @benevideschissanga/ngx-bootstrap-alert-notification
To use ngx-bootstrap-alert-notification
In your main module, import NgxBootstrapAlertNotificationModule.forRoot()
In your component inject the NgxBootstrapAlertNotificationService
and use like:
this.notificationService.show(
{
type: 'danger',
message:
'This is a notification with close button and icon and can have many lines.',
icon: 'icon icon-bell-55',
title: 'Danger',
},
{
position: 'topRight',
}
)
Property Name | Property Type | Property Value |
---|---|---|
type | NotificationType | warning , success , primary , info , danger |
title | string | Title for the alert |
icon | string | Icon class name |
message | string | Message to display |
template | TemplateRef |
Custom template |
You can pass custom configs
Property Name | Property Type | Property Value |
---|---|---|
position | string | topLeft , topCenter , topRight , bottomLeft , bottomCenter , bottomRight |
animation | boolean | Should be animated or not |
timeOut | number | Delay time to auto close the alert |
dismissible | boolean | Should auto close or not |
unique | boolean | Dont show duplicated messages if true |
0.0.3 - Angular 8
0.0.4 - Angular 9
0.0.5 - Angular 10