Renamed prefixes in angular.json
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
20
projects/common/src/fm/services/full-screen-guard.service.ts
Normal file
20
projects/common/src/fm/services/full-screen-guard.service.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanLoad, Route, CanActivate, CanDeactivate, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router';
|
||||
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import * as appCommonReducer from '../reducers/app-common.reducer'
|
||||
import * as appCommonActions from '../actions/app-common.actions';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class FullScreenGuard implements CanActivate {
|
||||
|
||||
private loginDispatched = false;
|
||||
constructor(private store: Store<appCommonReducer.State> ) { }
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||
this.store.dispatch(new appCommonActions.FullScreen());
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user