feat: add view shares account page (#868)

Fixes: #224
This commit is contained in:
Karan Takalkar
2020-06-13 01:54:44 +05:30
committed by GitHub
parent de701543e1
commit db248a8037
28 changed files with 972 additions and 1 deletions
@@ -0,0 +1,32 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { SharesService } from '../shares.service';
/**
* Shares Account data resolver.
*/
@Injectable()
export class SharesAccountViewResolver implements Resolve<Object> {
/**
* @param {SharesService} SharesService Shares service.
*/
constructor(private sharesService: SharesService) { }
/**
* Returns the Shares Account data.
* @param {ActivatedRouteSnapshot} route Route Snapshot
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const shareAccountId = route.paramMap.get('shareAccountId');
return this.sharesService.getSharesAccountData(shareAccountId);
}
}