Skip to main content
0 votes
0 answers
60 views

I’m working on an Angular v15+ app that uses a custom slideout panel system for showing forms. We’re trying to show an “unsaved changes” confirmation popup when the user closes the slideout, similar ...
sagar.p's user avatar
  • 39
1 vote
2 answers
954 views

Recently I have been through some trouble with my auth guard, which calls the API to check if current user is successfully logged in sending the auth cookie. This API returns a boolean value. The ...
Carlos Esteban Castro's user avatar
1 vote
1 answer
53 views

export const authorizedUserGuard: CanActivateFn = (route, state) => { console.log('guard call', route, state) const tokenService = inject(TokenStorageService); const router = inject(...
Shriyank's user avatar
1 vote
2 answers
271 views

I'm working on an Angular application where I want to prevent authenticated users from accessing the login and signup pages. I have implemented an AuthGuard to handle this. The guard works as expected ...
Anas B's user avatar
  • 31
1 vote
1 answer
262 views

I just started with coreUi and Angular 18 and would like to intercept the requests, when the user calls another route. I started with the standard coreUi modern theme and set everything up so far but ...
Sithys's user avatar
  • 3,801
1 vote
0 answers
155 views

I'm having a route /invoices/:invoiceId for an invoice detail view which needs to be protected with 2 conditions User needs to be authenticated --> Redirect to login page Invoice with given id ...
schaenk's user avatar
  • 721
3 votes
4 answers
6k views

Trying to get the following AuthGuard to properly redirect if a user is not logged in. export const authGuard: CanActivateFn = (route, state) => { const authService = inject(AuthService); const ...
WorldDrknss's user avatar
2 votes
1 answer
204 views

After login router.navigate goes to guard but in guard it doesn't get updated value. My app.config.ts is: export const appConfig: ApplicationConfig = { providers: [ provideRouter(routes), ...
Faisal ahmed's user avatar
3 votes
1 answer
2k views

I create a functional guard in angular 17 import { Inject } from '@angular/core'; export const checkoutGuard: CanActivateFn = (route, state) => { const customerService = Inject(CustomerService)...
salhi mustapha's user avatar
1 vote
0 answers
434 views

I would like to implement a CanDeactivate Guard in my Angular application. I've found out, that I should use the new "CanDeactivateFn" Guard, but I can't found any information or an example ...
Karthiga's user avatar
  • 907
1 vote
1 answer
424 views

I have a functional guard that I would like to export from one of my libraries. Initially the guard looked like this: export const canActivateAuthenticationFn: CanActivateFn = () => { const ...
heyhoo's user avatar
  • 72
1 vote
1 answer
475 views

I have a module federated angular application where I have a route-guard that redirects to another route. When loaded as standalone application redirection works perfectly, problem occurs when it is ...
Kedar Udupa's user avatar
0 votes
1 answer
2k views

I want to prevent navigation by changing the URL and only navigate on button click. My code: import {Injectable} from '@angular/core'; import {CanActivateFn, Router} from '@angular/router'; @...
Abhirup Das's user avatar
0 votes
1 answer
806 views

I've been having issues with a guard loop and I'm trying to find out the best routing setup. Current routing structure... Root path with a guard on it. A child dashboard route with a resolver that ...
OrangeJuice1-'s user avatar
8 votes
1 answer
8k views

Hello since the class guards are deprecated, I moved mine to a functional, but my test broke and I'm really confused of the injectable service of keycloak and the parameters of the guard. Here is the ...
DevDuke's user avatar
  • 137

15 30 50 per page
1
2 3 4 5
9