import { Injectable } from '@angular/core' ; import { CanActivate , ActivatedRouteSnapshot } from '@angular/router' ; import { Observable } from 'rxjs' ; import { Store } from '@ngrx/store' ; import { AppStore , isQuickShareEnabled } from '@alfresco/aca-shared/store' ; @ Injectable ( { providedIn : 'root' } ) export class AppSharedRuleGuard implements CanActivate { isQuickShareEnabled$ : Observable < boolean > ; constructor ( store ) { this . isQuickShareEnabled$ = store . select ( isQuickShareEnabled ) ; } canActivate ( _ ) { return this . isQuickShareEnabled$ ; } canActivateChild ( route ) { return this . canActivate ( route ) ; } }