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
5
votes
3 answers
Angular2 - Adding routerLink parameters to chosen table value
I have a routerLink attached to the lead value in a table I have created in the HTML of an angular2 component. Upon clicking that table value, I want the routerLink to not only send to the next component but also bring the chosen value to the next…

Matt Fazzini
- 141
- 1
- 14
4
votes
2 answers
Passing ID through router-link in Vue.js
I have 2 router links that link to the same page (definition page) but has different ids, in my definition page I have an if else loop that checks the id and then posts the apropriate definition for that id.my problem is that my loop can't properly…

Samuel chevarie
- 161
- 3
- 5
- 13
4
votes
2 answers
RouterLink is not working in Angular 6
I was coding watching a Brad Traversy tutorial. and I did exactly as it is said.
this is my 'app.module.ts'.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {RouterModule, Routes} from…

maneesha
- 145
- 2
- 4
- 12
4
votes
1 answer
Angular 5 - ngx-translate within routerLink
In my project (Angular 5 + Firebase), the user needs to choose the language at the login page. For that, I add select options and pass the selected value as parameter to the first page, as below:
form_login(f:NgForm){
if (!f.valid)
…

Atoyansk
- 233
- 5
- 20
4
votes
2 answers
Angular 5 RouterLink does not work with same path but different parameters
I have a anchor element with a RouterLink element that takes parameters. The parameters are necessary in order to navigate to the correct page. Now the router link works when I navigate the page from a different path. For instance my router module…

Stephen Agwu
- 1,013
- 2
- 15
- 29
4
votes
3 answers
How to pass variable query parameters with a routerLink in Angular 5
Within an *ngFor loop, where I'm building a list of search results (mat cards) with sample reading texts, I want to allow the user to click on one of them to read more, and open a route to a document template populated with the right doc.
This…

AppDreamer
- 1,266
- 3
- 16
- 34
4
votes
0 answers
Angular routerLink is appending the route-outlet insteading of replacing
I am learning Angular and TypeScript. Now I am developing a simple application just for learning purpose. I am having a problem with routeLink. One of my routeLink is adding new HTML to the existing one instead of replacing it. I have a complicated…

Wai Yan Hein
- 13,651
- 35
- 180
- 372
4
votes
3 answers
routerLink is not working in Angular
I am learning Angular JS using TypeScript. I have experience in Angular JS. But when it is integrated with TypeScript, it is completely new to me. I am now configuring the route for my application.
This is my app.module.ts file
import {…

Wai Yan Hein
- 13,651
- 35
- 180
- 372
4
votes
1 answer
Vue.js replace hashtags in text with
I receive some text from server which may contain some hashtags and when displaying this text I would like to convert these tags with links.
Example text is: "Today #weather is very nice"
Following code converts the string to
Today

Gokhan Celikkaya
- 716
- 1
- 7
- 17
4
votes
2 answers
router-link and href not working in Vue js
I am learning vue js and i created an admin page which i am able to route when i am using router-view but when i am trying href or router-link i am not able to load the template thought the url gets changed.
this is my main.js
import Vue from…

Kushagra Agarwal
- 1,816
- 7
- 18
- 31
4
votes
1 answer
How to test routerLink inside button tag angular2
Button looks like this
I want to check if url has redirected to /account/recovery/identification after the button is clicked
If it was an anchor tag…

Amit Chigadani
- 28,482
- 13
- 80
- 98
4
votes
1 answer
Unit testing RouterLink in Angular2 component
I am trying to test a click on a routerLink in my component:

Fjut
- 1,314
- 12
- 23
3
votes
1 answer
Angular Mat-Tab-Group navigation with routerLink
My url is localhost:port/home
when I click on a mat tab, I want to adjust the url to home/secondTab, home/thirdTab or home/firstTab. I would have expected it with this setup, but it doens't work.
I want to construct a route, with the goal when I…

dfbenny
- 140
- 1
- 12
3
votes
3 answers
Cannot Remove Underline From Vue router-link
I think I tried almost everything trying to remove underline from router-link.
This is my code:
Plan Your Trip
3
votes
4 answers
How to dynamically change content of component with JSON?
I am creating my design portfolio using Vue CLI 3. The architecture of my website is very simple. I have a home page, about page, work page, and several individual project pages:
Home
About
Work
Project
Project
Project
The work page consists…

Austin Branham
- 173
- 3
- 16