Mercurial > hg > ugly-duckling
view src/app/services/notifications/notifications.service.ts @ 505:cf4a17efb5d4
Update angular deps, fix material api changes. (currently running an earlier TypeScript version due to restrictions from angular)
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 12 Oct 2017 13:12:33 +0100 |
parents | 7f9fb84816b9 |
children |
line wrap: on
line source
/** * Created by lucast on 06/07/2017. */ import {Injectable} from '@angular/core'; import {MatSnackBar} from '@angular/material'; @Injectable() export class NotificationService { constructor(private snackBar: MatSnackBar) {} displayError(message: string): void { // TODO perhaps actual distinguish this as an error? this.displayMessage(message); } private displayMessage(message: string): void { this.snackBar.open(message, 'Dismiss', {duration: 5000}); }; }