24 lines
473 B
TypeScript
Raw Normal View History

2019-10-16 18:05:18 +09:00
import { Injectable } from '@angular/core';
import {
MatSnackBar,
MatSnackBarConfig,
MatSnackBarRef,
SimpleSnackBar
} from '@angular/material';
2019-10-16 18:05:18 +09:00
@Injectable({
providedIn: 'root'
})
export class SnackBarService {
public constructor(private matSnackBar: MatSnackBar) {}
public open(
message: string,
action?: string,
config?: MatSnackBarConfig
): MatSnackBarRef<SimpleSnackBar> {
return this.matSnackBar.open(message, action, config);
2019-10-16 18:05:18 +09:00
}
}