import { Component } from '@angular/core' ; @ Component ( { selector : 'app-demo-toast-basic' , templateUrl : './basic.html' , } ) export class DemoToastBasic { showTopToast = false ; onClose ( reason ) { console . log ( `Closed by ${ reason }` ) ; } }