feat: add manage surveys component (#343)

Fixes #186
This commit is contained in:
pwai
2018-12-09 19:29:55 +05:30
committed by Abhay Chawla
parent ed94d7492d
commit e40158bd6e
9 changed files with 244 additions and 3 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 { SystemService } from '../system.service';
/**
* Surveys data resolver.
*/
@Injectable()
export class ManageSurveysResolver implements Resolve<Object> {
/**
* @param {SystemService} systemService System service.
*/
constructor(private systemService: SystemService) {}
/**
* Returns the Surveys data.
* @returns {Observable<any>}
*/
resolve(): Observable<any> {
return this.systemService.getSurveys();
}
}