committed by
Abhay Chawla
parent
97ccce531b
commit
4281a19c6c
@@ -0,0 +1,30 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
/** Custom Services */
|
||||
import { ClientsService } from '../clients.service';
|
||||
|
||||
/**
|
||||
* Client Identifier Template resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientIdentifierTemplateResolver implements Resolve<Object> {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) { }
|
||||
/**
|
||||
* Returns the Client Identities data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const clientId = route.parent.paramMap.get('clientId');
|
||||
return this.clientsService.getClientIdentifierTemplate(clientId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user