Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import { Component, OnInit, Inject } from '@angular/core';
  2. import { MAT_SNACK_BAR_DATA, MatSnackBar } from '@angular/material';
  3.  
  4. @Component({
  5. selector: 'app-toast',
  6. templateUrl: './toast.component.html',
  7. styleUrls: ['./toast.component.css']
  8. })
  9. export class ToastComponent implements OnInit {
  10.  
  11. constructor(private snackBar: MatSnackBar,
  12. @Inject(MAT_SNACK_BAR_DATA) public data: any) { }
  13.  
  14. ngOnInit() {
  15. }
  16.  
  17. close():void{
  18. this.snackBar.dismiss();
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement