Created
April 24, 2019 13:58
-
-
Save Dssdiego/dcb466ebc48cdf5ff6f11f181a23d51e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { MatSnackBar } from '@angular/material'; | |
@Component({ | |
selector: 'app-toast', | |
templateUrl: './toast.component.html', | |
styleUrls: ['./toast.component.scss'] | |
}) | |
export class Toast implements OnInit { | |
constructor( | |
private snackBar: MatSnackBar | |
) { } | |
ngOnInit() { | |
this.snackBar.open('Product added to cart', 'OK', { duration: 4000 }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment