@angular-magic/ngx-toast
v1.2.2
Published
A simple Angular Library to show notifications with different types.
Downloads
102
Maintainers
Readme
ngx-toast
Demo: https://ngx-toast.angularmagic.com
This module contain Angular Toast/Notification functionality, which you can use instantly after installation, and then you can customize it.
Installation
npm
npm install @angular-magic/ngx-toast
Integration
- Import NgxToastModule into your application module
import { NgxToastModule } from "@angular-magic/ngx-toast";
@NgModule({
imports: [
NgxToastModule,
BrowserModule,
FormsModule,
...],
....
})
- Add toast center in your app component
<ngx-toast-center></ngx-toast-center>
- Now you can inject
NgxToastService
and use standard types of notification (success, error, warning & info) or useopen
method to create your custom notification.
import { NgxToastService } from "@angular-magic/toast.service";
constructor(
private ngxToastService: NgxToastService
) {
this.ngxToastService.success({title: 'Success', messages: ['User successfully updated!']})
}
GitHub
Please feel free to declare issues or contribute: https://github.com/angular-magic/ngx-toast