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

data between two components Angular 4

Hi I have a table in a page where it shows the list of all students And when we click on view button in the table, it takes to other page where it shows the details of specific student. The list of students is component 1 and student details is…
yer
  • 1,454
  • 2
  • 16
  • 33
0
votes
1 answer

Dynamically add routerLink to a component created dynamically via AJAX in Angular 5

I've got a component that downloads data from an API. When the user clicks Search, the content from the API is fetched via AJAX. This content from the API is in JSON and has got an ID of the product inside. I am able to create new HTML elements…
Maciej Dobosz
  • 148
  • 1
  • 12
0
votes
1 answer

How to use a fully variable URL in routerLink param

Let, I have an URL like below (I am actually getting it by get method)- /glaccounts/pending_tasks?taskId=2&taskCommand="CreateGeneralLedgerAccount" this URL resides on an object like this- {activity:"work",…
Shofol
  • 693
  • 1
  • 11
  • 26
0
votes
0 answers

nothing works well in mat-sidenav-container angular material 5

I'm using angular 5 and angular material. i have a mat-sidenav-container that consists of mat-sidenav and a mat-sidenav-content. and I have a mat-toolbar in the top of my page. I want to use routerLink in my sidenav-content but it's not working…
fariba.j
  • 1,737
  • 7
  • 23
  • 42
0
votes
0 answers

routerLink doesn't work in mat-sidenav

I have a mat-sidenav in my project and I want to link a text to another URL, but when I use routerLink it doesn't work but it works out of the side-nav.it even works in the toolbar. what is the problem? here are my codes: HTML:
fariba.j
  • 1,737
  • 7
  • 23
  • 42
0
votes
0 answers

Angular send an different type (enum) in the url when using routerLink

I have a button which has an routerlink. On the "routedpage" there is an enum which decides what will be loaded on the page. I like to send a param with the button so I can use it on the routed page. List of…
Babulaas
  • 761
  • 3
  • 13
  • 47
0
votes
1 answer

Angular - routerLink inside routerLink

I have one problem: I have:
Matley
  • 1,953
  • 4
  • 35
  • 73
0
votes
0 answers

Angular 5 Issue with menu structure

I'm working with angular-cli and I have a menu structured as follow(ul->li guided):
0
votes
1 answer

routerLink inside redirecting to dashboard/null path

i have 2 components search-metadata and add-metadata. i have an edit button inside search-meatadata clicking on which it should route to add-metadata. the edit button is inside < ng-template> and when i click on edit button it routes to…
Achutha K
  • 37
  • 5
0
votes
1 answer

"routerlink" only work for once then stop

I am building a angular 4 project, I have an parent component A, inside the HTML, there is a [routerlinkA], which link to component B. Inside component B, there are another [routerlinkB] link back to A. Everything works very well at first. Later…
Doris
  • 139
  • 1
  • 2
  • 9
0
votes
2 answers

Using *ngIf with routerlink

How would I implement "ngif" to a routerlink instead of creating a button? example: *ngIf="auth.isAuthenticated()" (click)="auth.logout()" To: Logout
Mystikal79
  • 3
  • 1
  • 3
0
votes
1 answer

angular 5 mean login to third party website, issues with routing

In my header component I have have a Login button that logs me into a third party website. The app sc2 initialises in the Header Component with a callbackURL. In the header I am getting a LoginURL which is used to connect to sc2. To the loginURL I…
oudekaas
  • 325
  • 1
  • 6
  • 21
0
votes
2 answers

How to add css class to a active in-page-link (hashtag link) - Angular

I have an Angular, single-page-website with the next layout
Gil Epshtain
  • 8,670
  • 7
  • 63
  • 89
0
votes
1 answer

RouterLink Does not Work Correctly

I have 2 components 1 for navigation and one for the contant of the page , RouterLink add the route path to the current routes for example if this routes {path:'home',component:HomeComponent}, …
Ramy hakam
  • 522
  • 1
  • 6
  • 19