mirror of
https://github.com/samnyan/aqua-viewer.git
synced 2026-04-23 00:17:14 -05:00
32 lines
575 B
TypeScript
32 lines
575 B
TypeScript
import {Component, Injectable, OnInit} from '@angular/core';
|
|
import {MatSnackBar} from '@angular/material/snack-bar';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
@Component({
|
|
selector: 'app-message',
|
|
templateUrl: './message.component.html',
|
|
styleUrls: ['./message.component.css']
|
|
})
|
|
export class MessageComponent implements OnInit {
|
|
|
|
|
|
constructor(
|
|
private _snackBar: MatSnackBar
|
|
) {
|
|
}
|
|
|
|
|
|
ngOnInit() {
|
|
this.openSnackBar('Initialized');
|
|
}
|
|
|
|
public openSnackBar(message: string) {
|
|
this._snackBar.open(message, 'OK', {
|
|
duration: 2000,
|
|
});
|
|
}
|
|
|
|
}
|