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

NuxtLink @click action before routing

I need to run a method before NuxtLink navigates to a route. In the method I want to decide whether to release it or not. Like in vanilla JS: Done I know how to stop NuxtLink and…
Yosef
  • 241
  • 2
  • 12
1
vote
1 answer

When i use ref to nuxt-link, i can't change styles on it (Nuxt.js)

In my function I am using ref, which is binded to link, and when I try to change color (ref.style.color = 'red'), I see a error. Because ref which is binded to nuxt-link is Object, and it hasn't style property. I know that I can use the tag ,…
1
vote
1 answer
1
vote
1 answer

Open modal in router-link Vue 3?

As you can see below, I have buttons consisting of router-links. But I want to open a modal in calculator button. When I run the codes below, all the buttons are converted to the modal. But I just want the calculator to open on modal. Here…
Sponge Coder
  • 71
  • 2
  • 10
1
vote
1 answer

Is it possible to use vue js 3 composition using v-for and add query string to routerlink?

I have v-for working correctly for a url path. Now, I would like to combine the url path with the query string to the routerlink tag. The query string is the date from the v-for item. I would like to dynamically pass query string to routerlink. If…
amarankes
  • 95
  • 3
  • 11
1
vote
2 answers

Page is not refreshing with the updated address bar link with id in angular

In my angular application I have Implemented signalR application for calls interation for members and admin. in admin page(Admin has members page with profiles) So my requirement is when the admin receives the call from members(basically in admin…
user1
  • 63
  • 3
  • 11
1
vote
2 answers

router-link won't load page

Can't find what I am doing wrong. If I type the url on the browser the page does load, but the links from the navbar do nothing. I am trying three different ways to use router-link, but makes no differences. It just won't render the page via link.…
MnL
  • 113
  • 9
1
vote
0 answers

Passing more than one params to router-link in vuejs

So I want to pass more than one params from Home.vue to Movie.vue using params with router-link like this :
1
vote
1 answer

testing a vue3 component with with jest

I got this test from another site. They are injecting a mock route. I think I need to mock router itself or pass a real one into the test so the page can run. There is a way to do this in vue 2, but I haven't found an example for vue 3. import {…
GeeWhizBang
  • 699
  • 4
  • 27
1
vote
1 answer

Vuejs, can't go to my signup link directly, it goes back to login

https://github.com/ahcene-bouazza/P7_Bouazza_Ahcene_Grouporama.git here is my github link for my project My issue is that when I am in login page, I clique on signup "inscription" it opens me the Signup page fine, but when I refresh the browser it…
1
vote
1 answer

Why doesn't routerLink navigate to page after user once logs out?

I have links as "Register" on login page & "Login" on register page. I used the code below to navigate:

Not a member? Register

and

Already have an account? Login

Code…
SaraJ
  • 43
  • 1
  • 7
1
vote
1 answer

`TypeError: Converting circular structure to JSON` error when writing tests for an angular component that utilizes routerLink, Spectator, and Jest

I'm trying to slowly whittle away at errors within a complex module in my application while setting up a new testbed for my application. I'm utilizing the routing factory api from spectator to create my test bed…
1
vote
1 answer

angular relative routing not work as expected

I develop an application using angular. In my application there is two kinds of path: type 1: http://localhost:4203/121/index (121 is merchant…
1
vote
0 answers

Vue's `` doesn't work when passed in data template literals?

I passed with ${...} for home page and without ${...} for log in page, but none works when passed in template. data(){ return { content: `

Click ${homepage} or…

Mir Stephen
  • 1,758
  • 4
  • 23
  • 54
1
vote
3 answers

How to use Storybook with a component using [routerLink] (Angular)?

I'm using Angular 11.0.5 and Storybook 6.1.14 and the following component: import { Component, HostBinding, Input } from '@angular/core'; @Component({ selector: 'ui-navigation-item', template: `
Sommereder
  • 904
  • 4
  • 10
  • 32