This is used by Angular (2+ maybe Angular JS too -not sure of that) to control navigation between UI components. It acts like a Controller/traffic cop, passing state information on via a URL. Here is the official link to the documentation
Questions tagged [routerlink]
312 questions
0
votes
1 answer
Service subscription in ngOnInit gets called once and does not stay populated on route change
Just to clarify. This angular app is populating the data to the view but when I navigate from one component to the other the ngOnInit lifecycle hook does not seem to get invoked thus meaning that the list on the view remains empty. When i hit f5…

Metrophobe
- 83
- 1
- 9
0
votes
1 answer
How to apply Angular routerLinkActive for tab component that sharing same path
I've created a page using angular material with sidebar and tab. Im using angular 7. Here is sample image ->
sample image:
When I navigate to content tab, is-active class no longer apply to selected group in sidebar (no highlight). it is sharing…

SKL
- 1,243
- 4
- 32
- 53
0
votes
1 answer
How to show Angular routerLink as plain text in html?
My HTML currently contains a routerLink like below, which works nicely
Click Here
How can I replace the text "Click Here" with the actual link generated by routerLink? Such that it looks…

Scarabol
- 63
- 3
0
votes
1 answer
How to redirect to new page in angular using routerLink?
I have a sidebar in my page with certain options, I want to get redirected in a new page when the options are clicked.
I have an option called 'Pricing Details' when I click it a new page should open with /pricing added to the end of the base the…

Pratik Chatterjee
- 122
- 3
- 11
0
votes
1 answer
How to navigate to intra page link by button click on vuejs form
I have a intralink on a page:
Preview Report
and when I submit form I call the method as shown below methods: { generateReport: function(link) { console.log(link); window.location.href =…
Ciasto piekarz
- 7,853
- 18
- 101
- 197
0
votes
0 answers
Nativescript (angular) TabView navigate away and then back without error
I am able to successfully navigate away from a tabview, but when I navigate back I get the following error:
CONSOLE ERROR
file:///app/tns_modules/@angular/core/bundles/core.umd.js:1743:28:
ERROR Error: Uncaught (in promise): Error: Cannot…

phillipintx
- 5
- 2
0
votes
1 answer
Can't use Angular routerLink in a variable
I'm trying to put a routerLink within in a const but it doesn't work.
const str4 = `
user10623427
0
votes
1 answer
Console Error for RouterLink After Upgrading Bootstrap
So I took the original Angular navigation template:
0
votes
1 answer
Using component getter to render router link will not work?
I am using angular 6 to develop my email application, I have a list of mail boxes for users who can click on the link to go to each mail box.
However, when I use component version A to render the list, nothing will happen when click on the router…

Jean M.C.
- 33
- 6
0
votes
1 answer
primeng ptable routerlink not passing queryParams
I am new to Angular and using primeng for display of data fields. When i click the hyperlink I want the data of the hyperlink to be displayed.
below is the code
…

Suresh G
- 1
- 1
0
votes
1 answer
How to provide routerLink in Parent component for shared components
I am building this app in angular 6 which uses Rest Country API to fetch all the countries and their details.
The problem I am facing is that I am not able to understand how to set routerLink in the parent component in order to fetch the details of…

Abhinav Alok
- 120
- 1
- 1
- 16
0
votes
1 answer
Angular: Setting routerLink queryParams as component property results in error
When I bind queryParams using routerLink in Angular2, I am getting this error:
[ERROR] Exception while trying to serialize the value
This error is shown when I inspect the DOM. The links simply do not show at all on the page, so this was my only…

Haley Lohrenz
- 11
- 1
- 1
0
votes
2 answers
RouterLink does not work properly
I have an app that works with RouterLink.
Here is the imports array in the App Module:
imports: [
BrowserModule,
RouterModule.forRoot([
{path: '', component: HomeComponent},
{path:'contact', component: ContactComponent},
…

Alpha Bravo Charlie ...
- 800
- 2
- 13
- 31
0
votes
0 answers
Angular 6 routerlink navigation to sibling throwing an error
I have an angular 6 SPA and I'm trying to
navigate to a sibling child when the user
clicks on a side menu, but after the click
event, it throws an error. I'm just changing the shown component right in the inner outlet
Error: Cannot activate an…

José Epifanio
- 16
- 2
0
votes
1 answer
Angular 4 get [routerLink] ViewChildren
I'm trying to get a list of all links in my current component, with a template looking something along the lines of this:
I tried to set up an…

Cabadath
- 897
- 3
- 13
- 23