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

angular cannot match routes

I want to create a menu in a angular application with rounterlinks. My routerlinks looks so:
  • Shopping
  • tobias
    • 63
    • 2
    • 8
    1
    vote
    2 answers

    Angular - Problem with [routerLink] redirects in the same module

    Currently i trying to do a SPA using Angular 9. I made a module called products with this route localhost:4200/products and for find a specified product i using this route http://localhost:4200/products/(number_id_product) I thought to implement…
    k16style
    • 133
    • 1
    • 2
    • 8
    1
    vote
    2 answers

    Angular 9 routerLink resolving semi-colon to %3B

    How can I prevent Angular 9 from rendering routerLink hrefs with URL encoding? Here is a stackblitz example of the problem, of the below example: https://angular-ivy-sxczmy.stackblitz.io/ typescript: myurl =…
    TimH
    • 1,012
    • 1
    • 14
    • 24
    1
    vote
    1 answer

    Tailwind & Vue-Router - dropdown menu doesn't close when clicking on menu items

    I'm using the following dropdown menu in tailwind & vue-router https://codepen.io/huphtur/pen/ordMeN. I need to use inside the dropdown menu, but I found out that doing that, once you click on a menu link the dropdown doesn't…
    1
    vote
    1 answer

    How to change the route and make the observable work?

    I am trying to load information from an observable, when I enter the route it loads correctly, but when I change the route with the routerLink the observable stops showing the information with the pipe async. The way I show the information of the…
    1
    vote
    1 answer

    Angular RouterLink relative path does not work in component having empty path

    I have my child path defined as { path: '', component: CartMainComponent, pathMatch: 'full' } The whole path looks like this when I am in CartMainComponent http://mystype.com/brand/MyBrandId/cart In the cart I want to navigate to…
    simply good
    • 991
    • 1
    • 12
    • 26
    1
    vote
    0 answers

    Iam passing data in link tag through aboutProps but it returns this error TypeError: Cannot read property 'aboutProps' of undefined

    I am sending aboutProps from here the following code (tagDisplay Co const queryParams = encodeURIComponent(tag.id); return (

    {tag.name}

    1
    vote
    0 answers

    Unable to open routerLink when navigating backwards to last slide of IonSlides component

    I have an infinitely looping IonSlides component with 5 slides. Each slide has a IonCard component which contains a routerLink to a different page in my app. Scrolling through the slides forwards (eg/ thumb goes right to left), everything is fine -…
    1
    vote
    1 answer

    How to serialize an item from an iterator when passing it using query string in Angular routerLink?

    I have an iterator and the idea is to create a sub-view (for editions, smoother display etc.). The linkage works as supposed to and the strategy was to fetch the subset of the data upon load of the sub.view component. Due to legal and financial…
    Konrad Viltersten
    • 36,151
    • 76
    • 250
    • 438
    1
    vote
    2 answers

    Not able to navigate to another Component - Angular

    I have 3 component from 1st moving to 2nd. But from 2nd I am not able to navigate 3rd component. Name showing only hyperlink but when clicking nothing happens. This is 2nd component code
    R15
    • 13,982
    • 14
    • 97
    • 173
    1
    vote
    1 answer

    How to load JS files in Angular8

    I have a problem displaying items on pages when following links Package Version ----------------------------------------------------------- @angular-devkit/architect 0.801.3 @angular-devkit/build-angular …
    1
    vote
    1 answer

    How to bring NavigationExtras to the store with NgRx-router-store?

    I want to save the state of NavigationExtras Information of the navigation call into store. I try to use NgRx router-store for that. I created a RouterStateSerializer, but i can't get access to the NavigationExtras data from here. The actual…
    daddykom
    • 222
    • 2
    • 8
    1
    vote
    1 answer

    angular anchor routerlink dynamic link address

    In the example below, the selectedDropdown has various subparameters including "dropdown", which contains the "title" and the "router link". I've tried a variety of ways to supply the routerLink and none work. The nxtLink.LinkRoute has valid…
    Yogi Bear
    • 943
    • 2
    • 16
    • 32
    1
    vote
    2 answers

    Right click open in new tab is not available on routerlink withhin a div tag

    I have a div element or tr element and there is a router link on it. Since it isnt an a tag, there is no option for right-clicking and "open in new tab" or strg + click for opening in new tab. But i want to achieve this function, so if the user…
    Emre Öztürk
    • 2,660
    • 4
    • 16
    • 19
    1
    vote
    0 answers

    How can I pass a in a string in an object as a prop to a child component?

    Based on what parent component calls the child component (a modal) the text of the modal is be populated with an object passed in as a prop from the parent component. In one instance, one of the items of the object (modalText) I'm passing in…