File

C:/GoDev/src/TCSTK-Angular/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/groups.resolver.ts

Index

Properties
Methods

Constructor

constructor(liveapps: LiveAppsService, appDefinitionService: TcAppDefinitionService)
Parameters :
Name Type Optional
liveapps LiveAppsService No
appDefinitionService TcAppDefinitionService No

Methods

resolve
resolve()
Returns : Observable<Groups>
import {Injectable} from '@angular/core';
import {Resolve} from '@angular/router';
import {Observable, of} from 'rxjs';
import {LiveAppsService} from '../services/live-apps.service';
import {Groups} from '../models/tc-groups-data';
import {TcAppDefinitionService} from '../services/tc-app-definition.service';

@Injectable()
export class GroupsResolver implements Resolve<Observable<Groups>> {

  constructor(public liveapps: LiveAppsService, private appDefinitionService: TcAppDefinitionService) {
  }

  resolve(): Observable<Groups> {
    const claims = this.appDefinitionService.claims;
    return of(new Groups().deserialize( { groups: this.appDefinitionService.usersGroups }));
  }
}

result-matching ""

    No results matching ""