Questions tagged [angular-routerlink]

220 questions
1
vote
2 answers
1
vote
0 answers

How to hide the route param Id passed in a router link from a HTML to a component in Angular or can we Hashing it?

I have a routerLink like this in my html page. [routerLink]="['/sales/hotels', hotels[0].code] And I am getting this id to my component like this. ngOnInit() { this.getId(); } getId() { this.route.params.subscribe( params => { …
Hans
  • 308
  • 7
  • 20
1
vote
2 answers

Angular passing directive to child element

I am building a navbar for my Angular app and I've decided to make a nav-item component for containing links inside of the navbar. I'd like to be able to pass a routerLink directive to it and have that directive get passed to the a element within…
1
vote
1 answer

cannot navigate to left side menu or open new report?

I work on angular 7 app I face issue my Issue is cannot navigate on left side menu.I can select only one report from left side menu but cannot navigate until I reload component report category meaning must go main menu to open new report. report…
1
vote
1 answer

Two Angular router-oulets in bootstrap modal

I have added Other modal in my Angular application both have different Previous one was working fine but after adding 2nd modal with different routes 1st stopped working. i tried with different name attributes on…
1
vote
2 answers

Angular: How to re-render a child component based on route change of parent app component?

My app renders a project component which contains information of a given ID from the URL like my.app/project/foo. The app component: uses the to render the project component contains a list of all projects in order to navigate to…
1
vote
3 answers

Angular routerLink and CTRL+Click/Mouse middleclick

I am building an Angular app with navigation using routerLink Everything works fine, but what I want to be able to do, is have functionality to open something in a new tab by clicking CTRL+Click or mouse middleclick. Can someone please tell me if…
kevla
  • 21
  • 3
1
vote
1 answer

Routerlinkactive not working on dynamically generated route on page load in Angular 8

I have an app build with Angular 8. Routerlinkactive is not activated on dynamically generated route at the beginning, but when I click on some other links in the same module and come back then it works. The routerLinkActive is set in the…
johannesMatevosyan
  • 1,974
  • 2
  • 30
  • 40
1
vote
1 answer

Angular routerLink directive in modal component not working as expected

I encountered pretty strange situation with routerLink directive used in NgbModal. To start, I have feature module with structure like this: -feature/ -components/ -popup-component/ popup-component.ts -preferences-component/ …
1
vote
1 answer

Angular routerlink link not working in sidebar of sb admin 2 bootstrap 4 template

I am integrating SB Admin2 template with my angular 7 project.But any link in the sidebar is not working. Even they are not clickable totally. But if put a router link in body wrapper it works as it should. I have already tried using [routerlink]…
1
vote
0 answers

Set default path for Angular auxiliary route

so I have this setup . It sets the default path for left-router the ExploreAllComponent as you can see. I want the first routerLink to direct to the outlet's home path, but this way it's not working. I've tried with '/', but it isn't working…
1
vote
1 answer

Angular : How to open Details Component and pass id on ButtonClick

I have List and Details components in an Angular (v7) project and I open the Details of a record using the following approach: ListComponent.html: {{ row.Title }} DetailsComponent.ts: import {…
Jack
  • 1
  • 21
  • 118
  • 236
1
vote
1 answer

Convert an internal url to act similar to routerlink

I get an html from my api that gets rendered inside my angular template. It contains urls that link to other routes on my app. Example: http://localhost:4200/some/component?query=somethingelse&foo=bar # or…
dabishan
  • 671
  • 3
  • 10
1
vote
1 answer

My submenu's href and routerlink doesn't work but other links in the project works fine

I'm using Angular 7 to build a website and I have a navigation menu bar generated dynamically. All of the menu items work perfectly ( using href ), the routing works fine. But in one component I have other links supposed to route me to different…
Antsa R
  • 15
  • 3
1
vote
2 answers

Best way to pass angular routerLink URL's in an HTML string

I have a notification service in my angular app, typically you call it like this.notificationsService.showError('My Title', 'My Message...'); I'd like to have the ability to to pass app links in the messages as well, and I know I need to allow…
Chris Barr
  • 29,851
  • 23
  • 95
  • 135