1.2.2 • Published 11 months ago

@angular-magic/ngx-toast v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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.

NPM

Installation

npm

npm install @angular-magic/ngx-toast

Integration

  1. Import NgxToastModule into your application module
import { NgxToastModule } from "@angular-magic/ngx-toast";

@NgModule({
  imports: [
    NgxToastModule,
    BrowserModule,
    FormsModule,
    ...],
  ....
})
  1. Add toast center in your app component
<ngx-toast-center></ngx-toast-center>
  1. Now you can inject NgxToastService and use standard types of notification (success, error, warning & info) or use open 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