3,764 questions
2
votes
1
answer
136
views
angular 20 children routes seems not loaded at all when lazy load of component enabled
I have main route:
{
path: 'signup',
loadComponent: () => import('./signup/signup.component').then(m => m.SignUpComponent),
children: signUpRoutes
},
and inside signUpRoutes I ...
3
votes
1
answer
254
views
Angular 17 Module to Standalone Conversion. How should I setup main.ts or app.config.ts?
I'm trying to change my Angular 17 project to be a standalone project. But some of the fundamental files are different than how they are defined in tutorials and other people's projects. I didn't have ...
1
vote
1
answer
212
views
Angular Library Routing Not Working When Used Inside Angular 19 App
I'm working on an Angular 19 app that uses a custom Angular library, and I'm having trouble getting the routing inside the library to work properly.
The app is a legacy app and all the components are ...
1
vote
1
answer
81
views
Angular routing - avoid showing two components in router outlet at the same time during enter and leave animations
The problem us basically explained in the title. I have router-outlet and components with :enter and :leave animations. During navigating from one to another both components are in outlet at the same ...
0
votes
2
answers
78
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>
&...
0
votes
1
answer
61
views
Angular dynamic component loading through a config file
I have a question about angular dynamic component loading through an environment config file.
Below is a sample of my environment file:
routes: [
{
name: 'auth/logout',
path: '../../...
2
votes
1
answer
50
views
Cannot match children routes of blank path
I have this configuration in my routing in Angular:
...
{
path: 'account',
canActivate: [AuthGuardService],
children: [
{
path: '',
...
0
votes
0
answers
184
views
Angular 19 + ngx-translate-router: Language not detected from URL, always redirects to /en
Problem
I am using Angular 19 with ngx-translate-router to handle localized routes. However, my app always redirects to /en on startup, even when a different language is present in the URL.
For ...
1
vote
1
answer
58
views
Detecting if an Angular route came from a child/sub router-outlet
I have an Angular 19 app, and I've added the route transition animations. Docs for that are here: https://angular.dev/guide/animations/route-animations
In my application bootstrap, I have this:
...
0
votes
0
answers
42
views
How should I handle the slash in search terms in Spartacus Commerce Cloud?
The official documentation has provided a way to handle the "slash" symbol in product names, by using a PRODUCT_NORMALIZER.
https://sap.github.io/spartacus-docs/adding-and-customizing-routes/...
1
vote
1
answer
74
views
Why DI RouterState in standalone app triggers NullInjectorError
I am getting NullInjectorError error in brand new angular app.
I have just generated this app as a standalone angular app (ng new StandaloneApp). In the AppComponent's constructor I have added ...
0
votes
1
answer
86
views
Background Video not loading after implementing Lazy Loading in Angular
So, I have been practicing Angular during these days, and I encountered this issue while implementing lazy loading. My video doesn't load; if it does, it is not muted, and after refreshing the webpage,...
1
vote
1
answer
66
views
default route resolver (Angular)
I'm trying to set some state in our NgRx Store for specific pages (I'll cause these POI - "page of interest"). If not one of those pages, I would like to set the Store to a default value. We ...
0
votes
0
answers
214
views
Angular 18 navigation between routes
I'm working with Angular and have implemented a NavigationService to handle routing/navigation in my app. However, i’m experiencing an issue where the navigation does not occur on the first click. I ...
1
vote
1
answer
192
views
How do I use Angular's inject within a canActivate function?
In the following canActivate function, I need to get the number of Items in a cart. I inject the CartService for this purpose but am getting an error that inject() must be called from an injection ...
1
vote
1
answer
49
views
The parent component will be activated only when the child route is activated
I want a route structure like this:
If I go to the "/sale" route:
dashboard
feature
sale
If I go to the "/" route:
dashboard
That is, if the child route is not activated, ...
1
vote
2
answers
690
views
Angular Router - how to destroy old component immediately when routerLink changes
In Angular, after a routerLink triggers a route change, the old component is only destroyed basically at the same time as the new component's initialization:
This is being a problem for me because I ...
1
vote
0
answers
377
views
How to inject RouteReuseStrategy only in specific components?
In my Angular16 standalone app I want to implement a RouteReuseStrategy and add it only to specific components. I found some solutions that implied using some extras (eg https://stackoverflow.com/a/...
3
votes
1
answer
807
views
Children route parameter are not set with withComponentInputBinding
In an Angular 18 application I can not have children route parameter set.
I have a route defined as
export const routes: Routes = [
{ path: 'test',
children: [
{ path: ':operation/:id', ...
0
votes
1
answer
72
views
Route encoding Angular 12: Routing not working as expected [closed]
Recently upgraded Angular application from version 9 to 12.
Now, my current routes are not working, and encoded to %23.
Here is an example of my routes:
{ path: 'app-terminal-request-list', component: ...
2
votes
1
answer
144
views
How to maintain query params when redirecting in Angular RoutingModule with redirectTo?
Summary
I want to redirect in my Angular RoutingModule from one path to another while maintaining the query params. However, when the redirect completes, the query params are not present anymore.
The ...
0
votes
1
answer
71
views
Angular client side dynamic route redirect to wildcard route on page reload
In angular app I have hundreds of dynamic routes. Which are added in route config after an API call.
But when I reload the same page with dynamic route, browser send the request to server and return ...
1
vote
0
answers
235
views
Angular Direct Routing Not Working When Copying and Pasting URL
I'm facing an issue with routing in my Angular application. When I directly copy and paste a URL into the browser (e.g., https://myapp.dev/material-details/bd3d31dd-945a-4faf-a888-be43204d6a85/...
1
vote
1
answer
58
views
Migration from Angular version 13 to 14 LoadChildrenCallback issue
loadChildren: () =>
import(/* webpackChunkName: "apc" */ 'advanced-payments-control')
.then((m) => m.AdvancedPaymentsControlModule)
.catch((e) => {
...
0
votes
3
answers
253
views
How do I use child routes in angular 17 angular routing
How do I create child routes for a tab page using angular?
app.component.html
<main class="main">
<div class="content container-fluid">
<router-outlet></...