added basic snackbar

urls
FlayInAHook 4 years ago
parent 03d86bf3ca
commit 4a3ffc23bd

@ -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']
});
}
}
Loading…
Cancel
Save