130. Creating notification service (#16)
This commit is contained in:
@ -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();
|
||||
});
|
||||
});
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user