import { Component } from '@angular/core' ; import { Router } from '@angular/router' ; import { GlobalsService } from './services/globals.service' ; import { MatDialog , MatDialogRef , MAT_DIALOG_DATA , MatSnackBar } from '@angular/material' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] , } ) export class AppComponent { constructor ( public global , public router , public dialog ) { } loading ( ) { return this . global . loading ; } hideLoading ( ) { this . global . loading = false ; } goto ( path ) { this . router . navigateByUrl ( path ) ; } }