Questions tagged [routerlink]

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

312 questions
1
vote
1 answer

How to generate different routerLinks from ngFor created items?

I'm using a ngFor (in a "list-component") to display several "item-component" and I want to send the user to a "item-detail-component" when he clicks on one of these items. Problem is I'm still an early learner on Angular and I don't understand the…
Alvard
  • 91
  • 1
  • 8
1
vote
2 answers

How can I remove the 300ms delay on Angular routerLink using Hammer.js?

I am trying to remove the famous 300ms delay from my app with Hammer.js, and have been successful so far using tap in stead of click. However, this does not work on routerLink's. I haven't found any articles or other people writing about this…
Lirianna
  • 330
  • 1
  • 13
1
vote
1 answer

convert regular a tag to routerlink

I have HTML in a string coming from the server: str = '
The linkL About
'; This is just an example, I have a really long HTML with a lot of links. in the template I have this
SexyMF
  • 10,657
  • 33
  • 102
  • 206
1
vote
0 answers

Angular6 - routerLink change stuff based on the page where I am

I'm currently learning Angluar6 and I'm in a bit of a pickle. The current layout looks like this: homescreen If I press any of the buttons I will go to their pages: /help /leaderboards /maingame This is what I want to do right now. I'm giving an…
PET
  • 13
  • 5
1
vote
0 answers

Ionic4 How to combine split pane & tabs and check routes

i need help please Can you help me please to combine ion-tabs inside split pane, and verify is my routes are corrects please. i do some try and test but i don’t understand how to configure correctly routes and router-outlet you can try on stackblitz…
Celtiore
  • 11
  • 2
1
vote
2 answers

Error: Cannot match any routes. URL Segment: 'submit'

I'm trying to navigate from one component to another, but nothing is working for me. I've tried routerLink as well, but it didn't work too. Below is my explore.components.ts file: import { Component, OnInit } from '@angular/core'; import {Router}…
Nikita
  • 211
  • 4
  • 16
1
vote
0 answers

Angular2 - Dynamically include routerLink in string

I'm using the mean stack with Angular 6 and i'm currently creating a notification system. I'm getting 'events' from my database and I want to be able to display their messages which may contain url links to other parts of the site. For example one…
Michael B
  • 153
  • 4
  • 15
1
vote
0 answers

Javascript stops working after page-redirection (ANGULAR)

I'm using angular 6 to create a testimonial slider. It looks great, but the problem is... I'm using RouterLink in my header, so everything loads at once. When you open the page with testimonial javascript for the first time it works, but then when…
UnluckyLAD
  • 169
  • 2
  • 18
1
vote
3 answers

Add active class to routerlink in angular 4

I would like to add an active class when changing routes. I have an link in one component (home page) which redirects to other component (details page). Now when I return back from…
yer
  • 1,454
  • 2
  • 16
  • 33
1
vote
2 answers

Setting up Paging with links in Angular template

I have tried the below solution : {{page}} If I remove the {{page}} in the routerlink it works, otherwise it gives error. But I need of course the page number inside the link so that I may direct to the proper page. How can I…
user1238784
  • 2,250
  • 3
  • 22
  • 41
1
vote
1 answer

Angular 5.2: Data persistence across routes using service

I have a drop down nav bar with different router links for each option. When a user searches, I want search type and search filter value to be remembered and have the previous values shown when the users navigates to search option again. I am using…
vk3305
  • 31
  • 2
1
vote
3 answers

Angular.io [routerLink] passing optional dynamic parameters

I am trying to build navigation links dynamically which also has optional paramteers
VR1256
  • 1,266
  • 4
  • 28
  • 56
1
vote
1 answer

Angular 5 routerLink doesn't work correctly

There are one module which contains all components and one route module. The routing module: import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { UserComponent } from…
Zorian
  • 23
  • 6
1
vote
1 answer

RouterLink in Angular 5 not show real path on DevTooLs

I want to know is this bug or specification that i can't find. In Angular 5, when I use routerLink like this All works fine and I can route to URL…
1
vote
0 answers

Routes cannot be matched when using multiple router-outlets and routerLink

I cannot get a link to work in my Angular 2 application. My page consists of two parts: a header and the content below that. The two parts are modeled by a router-outlets of each. When I click on the link, usually I want to change both the header…
E_3
  • 181
  • 7