added basic snackbar
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…
Reference in New Issue