Questions tagged [angular-routerlink]
220 questions
1
vote
1 answer
Angular routerLinkActive not working when navigating using skipLocationChange
Suppose I have following routes:
const routes: Routes[] = [
{
path: 'a',
component: AComponent
},
{
path: 'b',
component: BComponent
}
]
And I have some Navbar link with routerLinkActive class when on path a like this:

JelmaLieur
- 33
- 4
1
vote
1 answer
Angular: detect click on current page link
Is there any way to use Angular build in router properties, such as RouterLinkActive to detect click on the link to current page?
In the footer I want to add function to scroll to top if clicked on the current page link.
I have this:

Filip Witkowski
- 795
- 3
- 14
- 24
1
vote
1 answer
routelink not redirecting to child component
I have a child component that i want to add to my route outlet. But when i click nothing happens.
Here's my routelink

Kael
- 161
- 2
- 13
1
vote
2 answers
NG04005: Invalid number of '../'
When I have the below route
Home
Exception
Error: NG04005: Invalid number of '../'
at createPositionApplyingDoubleDots (router.mjs:1082:19)
at…

San Jaisy
- 15,327
- 34
- 171
- 290
1
vote
0 answers
Angular router link for subcategories not working
I have defined categories and sub-categories for products in my angular app. I intend to have a tree structure for the categories whereby, a top-level category can theoretically have infinite number of nested sub-categories.
When I navigate to the…

Otuoma Sanya
- 141
- 1
- 4
- 10
1
vote
2 answers
Angular routerLinkActive only updates after clicking somewhere on the screen
Using Angular 13
I have a side menu which I build like this
{{page?.icon}}
…

Rene Trujillo
- 379
- 3
- 16
1
vote
0 answers
Angular routing does not change navigation on Long base64 URL string
I have the problem that my angular nav page is not "updating" when I click on links that look quite similar in path, they just differ in a long base64 string at the end that contains saved user profile data. Depending on the data that is saved, the…

MMMM
- 3,320
- 8
- 43
- 80
1
vote
1 answer
Redirect to new page by replacing the current page
My goal: user is in the welcome page(app component html) and when clicked on button, he should be able to go to another html page.
I checked the tutorials and know that i should use routes to do this but whatever I do, i couldn't get this simple…

Ahmet Eroğlu
- 594
- 1
- 7
- 23
1
vote
2 answers
How can access to routerLink value via custom directive?
How can I create a custom directive(e.g. appCheckPermission ) to check if user can view a link or button base on routerLink that applied to that element.
p.s:
there is a…
user3910994
1
vote
1 answer
Lazy Loading component inside named router outlet, children in primary
I have a component called clientComponent. Inside the component I have named routerLink, let's call it clientView. This routerLink is inside the primary router link. The clientView should show only direct children of the route. So in other…

manneJan89
- 1,004
- 8
- 27
1
vote
1 answer
One tab not navigating
Angular project. Used by Router. There is a navigation bar with 8 items. The transition to tab 2 does not occur if you go from tab 4. Any other combination works. How to catch the problem in this situation, how to debug it? In a subscription to…

Aleks-JS
- 23
- 2
1
vote
0 answers
Angular 9 routerLink to 2 outlets at the same time
How can I have routerLink link to both main router-outlet and secondary (sidebar) router-outlet?
I have:
FILTERS
HOME
When I am trying to combine this…

Filip Witkowski
- 795
- 3
- 14
- 24
1
vote
3 answers
Angular router link and click event trigger
I have an angular component that for the purpose looks like this:
occupies 100% of the div, so when I am clicking the div or anchor, I want to trigger onClick() event plus…

heisenberg
- 1,172
- 6
- 14
- 31
1
vote
0 answers
Correct pattern for dynamically loading components into an Angular application
Angular newbie layout question. I'd like all content in app.component.html to be replaced with the content of the selected component when an item in my navigationComponent is clicked. With the way I have laid it out, the selected component content…

Fred2020
- 315
- 3
- 14
1
vote
1 answer
NgModuleFactoryLoader.load() is not able to find the module
Please refer my project structure here I have create a project with multiple lazy loaded nested modules.
On the application start up AppModule is loaded
When the user clicks on login button LoginModule is loaded
If the user exists i.e if login is…

SRIJAN PRAKASH
- 13
- 1
- 4