feat: add view notifications page (#1170)

Fixes: #1169
This commit is contained in:
Karan Takalkar
2020-08-03 16:24:20 +05:30
committed by GitHub
parent ac280d2447
commit 30139026bd
11 changed files with 246 additions and 2 deletions
@@ -0,0 +1,30 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { NotificationsService } from './notifications.service';
/**
* Notifications data resolver.
*/
@Injectable()
export class NotificationsResolver implements Resolve<Object> {
/**
* @param {NotificationsService} notificationsService Notifications service.
*/
constructor(private notificationsService: NotificationsService) {}
/**
* Returns the Notifications data.
* @returns {Observable<any>}
*/
resolve(): Observable<any> {
return this.notificationsService.getNotifications(true);
}
}