You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
490 B
20 lines
490 B
5 years ago
|
import { Component, OnInit } from '@angular/core';
|
||
|
import {MatSnackBar} from '@angular/material/snack-bar';
|
||
|
@Component({
|
||
|
selector: 'app-snackbar',
|
||
|
templateUrl: './snackbar.component.html',
|
||
|
styleUrls: ['./snackbar.component.scss']
|
||
|
})
|
||
|
export class SnackbarComponent implements OnInit {
|
||
|
|
||
|
constructor(private _snackBar: MatSnackBar) { }
|
||
|
|
||
|
ngOnInit() {
|
||
|
}
|
||
|
openSnackBar(message: string, action: string) {
|
||
|
this._snackBar.open(message, action, {
|
||
|
duration: 2000,
|
||
|
});
|
||
|
}
|
||
|
}
|