4,813 questions
2 votes
1 answer
116 views
AuthGuard is not working in my angular 15 application
I am trying to set AuthGuard for a user details component page. Without login user details page can not see. I am storing login details in localStorage. If i add AuthGuard to user details component my ...
0 votes
0 answers
50 views
Why does the canActivateChild guard on route gets called before canActivateChild guard on parent route?
When I navigate to SomeChildComponent, I wonder why SOME_CHILD_GUARD is called before SOME_PARENT_GUARD. It makes no sense to me. And I would like the order to be inverted. I have not found anything ...
1 vote
1 answer
106 views
Angular OAuth with Docker and hashed routing
I have a confluence of a few things that are all great individually but when I bring them together, they are causing problems. I have an Angular SPA, updated to Angular 20, that uses a Keycloak server ...
2 votes
1 answer
136 views
Multiple <router-outlet> Angular 19
I have a page where I display a material table with a select drop-down to select a category from multiple categories and a search box to filter the table. I want to give each category in the drop-down ...
1 vote
1 answer
186 views
Angular 19 - NG04002: Cannot match any routes. URL Segment: 'company-create'
I've been researching this all morning and can't seem to figure this out. I keep getting this error but followed (what I thought) the fix from others. I'm new to routing within a nav component. I'm ...
3 votes
2 answers
232 views
Angular 19 - Routing not working with <a> element
I'm developing a simple app to practice with Angular and I'm hitting a wall regarding routing. I'm not using standalone component. I have a app.routing.module as follow: import { NgModule } from '@...
3 votes
0 answers
69 views
How to change the state of a routerLink to a route whose navigation is prevented by a guard
If I have a route like: export const routes: Routes = [ { path: 'phony', component: PhonyComponent, canActivate: [() => inject(PhonyService).ok] } ]; And a ...
0 votes
2 answers
97 views
How to use a secondary router outlet without ng modules correctly to enable page reload by url?
How to use a secondary router outlet without ng modules correctly enabling page reload by url? I have an app component with a router: <main> <router-outlet></router-outlet> &...
1 vote
1 answer
222 views
Rerouting to child route not working as expected
I have 2 components: claims-summary and claims-insights. When I am in the claims-summary component, the URL will be "/claims-summary/claimId/". When I navigate from claims-summary and claims-...
1 vote
1 answer
173 views
How to have a route guard that routes to an auxiliary route after passing?
I have a section of my Angular app that is only accessible through a generated link sent to the user's email (a Docusign type thing). It is sectioned off from the rest of the app via a feature module, ...
1 vote
0 answers
34 views
how to pass state in default route Angular
i'm facing an issue passing router state to the default child route("general"), the state is set only when i click on the tab, FunctionalLocationDetailsComponent is parent component, ...
0 votes
1 answer
103 views
Why interacting of two guards leads to infinite redirection loop in Angular 18?
I've got routes '/' and '/auth'. The logic is that NOT logged in users can access ONLY /auth page, while logged in users CAN'T access it. So, I've made two guards and for some reason I get infinite ...
1 vote
0 answers
18 views
routerLinkActive is applied to every fragment (anchor) link [duplicate]
In my header in every link I have routerLinkActive, but the style-class is applied to every single link because, I guess, Angular doesn't care when it's fragments. Does anyone know how to apple ...
2 votes
0 answers
72 views
Wrong Redirect Angular Router (to localhost)
This is the example url : localhost:4202/pages/users/STSP0001PNIENOUIJX/dashboards/level/0 app-routing.module.ts const routes: Routes = [ { path: 'pages/users', loadChildren: () => ...
1 vote
1 answer
488 views
Angular 18 - Route to nested components
I have a Login component which is the initial page. On the success of Login, it will route to the Home component which will hold 3 components: TopBar component which has a nav bar & 2 components ...