mirror of https://github.com/Squidex/squidex.git
9 changed files with 45 additions and 15 deletions
@ -0,0 +1,24 @@ |
|||
/* |
|||
* Squidex Headless CMS |
|||
* |
|||
* @license |
|||
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
|||
*/ |
|||
|
|||
import { Injectable } from '@angular/core'; |
|||
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router'; |
|||
import { Observable } from 'rxjs'; |
|||
|
|||
import { AppsState } from './../state/apps.state'; |
|||
|
|||
@Injectable() |
|||
export class LoadAppsGuard implements CanActivate { |
|||
constructor( |
|||
private readonly appsState: AppsState |
|||
) { |
|||
} |
|||
|
|||
public canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> { |
|||
return this.appsState.loadApps().map(a => true); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue