4,814 questions
0
votes
0
answers
41
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
87
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
114
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
127
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
200
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
64
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
83
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
209
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
155
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
31
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
86
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
59
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
481
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 ...
0
votes
2
answers
206
views
NG - Problem navigating back to Login-Page after successful Logout
I have the problem with my angular spa, that after the user successfully logs out, the navigation back to the login page per default doesn´t work. This means https://domain.tld/login is shown in the ...