diff --git a/src/app/services/snackbar.service.ts b/src/app/services/snackbar.service.ts new file mode 100644 index 0000000..7df0077 --- /dev/null +++ b/src/app/services/snackbar.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import {MatSnackBar} from '@angular/material/snack-bar'; + +@Injectable({ + providedIn: 'root', +}) +export class SnackBarService { + + constructor(private snackBar : MatSnackBar) { } + + + openSnackBar(message: string, action: string) { + this.snackBar.open(message, action, { + duration: 5000, + panelClass: ['mat-toolbar', 'mat-primary'] + }); + } +}