import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; import { GroupService } from "../../services/groups/group.service" ; import { ContextService } from "../../services/context.service" ; @ Injectable ( ) export class AllGroupsResolve implements Resolve < any > { constructor ( private context ) { } resolve ( route ) { return this . context . getAllGroups ( ) ; } }