npm toaster angular 9 code example
Example 1: how to add toaster in angular 9
npm install ngx-toastr --save
Example 2: install toastr in angular
npm install ngx-toastr --save
Example 3: toaster service
import { ToastrService } from 'ngx-toastr'; @Component({...})export class YourComponent { constructor(private toastr: ToastrService) {} showSuccess() { this.toastr.success('Hello world!', 'Toastr fun!'); }}