I am currently using a canActivate-service for my angular parent route and therefore for all the childroutes. looks like that for example
const routes: Routes = [
{
path: '',
canActivate: [ServiceWhichShouldRunEvery10Minutes],
runGuardsAndResolvers: 'always',
children: [
{
path: routeA,
component: a,
},
{
path: routeB,
pathMatch: 'full',
component: b,
},...
canActivate-method
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {
// condition that i want to check every 10 minutes
}
How do I ensure, that this canActivate service will be fired every 10 minutes? Thanks in advance, any help is appreciated