130. Creating notification service (#16)

This commit is contained in:
Art
2021-09-17 14:54:47 +03:00
parent fd84681347
commit 279e7178ee
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import {TestBed} from '@angular/core/testing';
import {NotificationService} from './notification.service';
describe('NotificationService', () => {
let service: NotificationService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(NotificationService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,16 @@
import {Injectable} from '@angular/core';
import {NotifierService} from "angular-notifier";
@Injectable({
providedIn: 'root'
})
export class NotificationService {
constructor(private notifier: NotifierService) {
}
public notify(type: string, message: string): void {
this.notifier.notify(type, message);
}
}