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
0 answers

ngfor routerlink browser back button error Angular2/4

I have an Angular App with a ngFor retrieving values from a firestore collection then placed inside a [routerLink] to navigating to a list page In class.component.html
tru
  • 13
  • 4
1
vote
1 answer

Vue.js: active class for router-link

I have a sidebar item which is active when I click on it. It is obvious that when I click on a sublink inside a component, my active class switches off. How to prevent this? My sidebar:
Olga B
  • 513
  • 2
  • 11
  • 34
1
vote
1 answer

how to redirect from vue router-link using query?

How to add a query to the router-link so the user will be redirected to the comment under a post by clicking on the link from the notification? API gives us an anchor of the notification and id of the comment. When the DOM renders a page, it loads a…
Olga B
  • 513
  • 2
  • 11
  • 34
1
vote
1 answer

routerlink and router.navigate

I was reading that routerlink implicitly calls relativeTo whereas this.router.navigate doesn't. Knowing this info, I still can't seem to make the below work. The routerlink works and gives me the following…
oudekaas
  • 325
  • 1
  • 6
  • 21
1
vote
2 answers

Angular 2 - Cannot match any routes for nested resource

I am working with an Angular front end application scaffolded by the JHipster generator. This is connected to a microservice which is backed by Mongo. I'm dealing with a resource that contains a list of subobjects. Something like: preferenceList: { …
IcedDante
  • 6,145
  • 12
  • 57
  • 100
1
vote
0 answers

how can we put different value while embedding selector in other component in Angular 4

I have around 300 components and I am adding embedding one common menu html, and I want to change url value with unique value. here is my files: common.menu.component.html
1
vote
0 answers

Angular 4 - Can't open popup using multiple outlets

I'm developing an Angular 4 application with some chained outlet routes and I'm having some trouble to make a popup appear using route. Basically the popup route's path is "pages/admin/user-management/new" the routes are configured this way: The…
brevleq
  • 2,081
  • 10
  • 53
  • 97
1
vote
0 answers

Using route.snapshot with routerLink in angular app to get url

I am trying to handle a situation in my Angular app where I have some interior links (links within a section - that use a different navigation mechanism than the rest of the app) that are being loaded via routerLink. That works well enough by…
Muirik
  • 6,049
  • 7
  • 58
  • 116
1
vote
0 answers

RouterLink with named outlet and base path

I have an issue with the routing of my app: I have a base and 2 and My route is currently path : '' : '' : '' and I want to go to path : '' …
Theo
  • 473
  • 8
  • 20
1
vote
0 answers

To add routerlink to an element dynamically from type script code in angular 2

In my Angular application I came across a scenario in which I have to show an activity history for a user as in Facebook's activity log. The activity templates may be of different types like: KLM creates subOrder 10463 from Order 2569 XYZ deleted…
1
vote
0 answers

Angular 4 several routerLinks using the same component

I am having some trouble trying to find a workaround to this: In one hand I've got defined my routes like the following: const appRoutes: Routes = [ { path: '**', component: TemplateComponent, pathMatch: 'full' } ]; export const routing:…
Jose Berciano
  • 163
  • 2
  • 3
  • 13
1
vote
3 answers

How to pass 2 parameters from routerLink?

I am trying to pass 2 parameters through the routerLink, to my component and then to my service to get the data. The Html looks like this:-

{{res.owner.login}}

and…
JMon
  • 3,387
  • 16
  • 63
  • 102
1
vote
1 answer

routerLink is not working in angular 2

Routing in page is not happening. I have used below HTML and config code.
1
vote
4 answers

routerLink not working in innerHTML with angular2&4.0.0+

I'm using:[angular-cli=1.0.0+ node=7.7.4+ angular=4.0.0+] in my html page i use code
ts: htmlWrite='' but when i use 'npm start' start my serve,in html i just see
MrRiver
  • 53
  • 1
  • 4