Questions tagged [angular-routerlink]

220 questions
2
votes
2 answers

How to pass object between components when switching between routes Angular

I have a component which looks like this It gets animal object from parent component, which is just a list of childs. @Input() animal; When I…
Person
  • 2,190
  • 7
  • 30
  • 58
2
votes
1 answer

Angular 6 Safari router related error

The site works in Chrome and Firefox. In Safari, you can navigate to any router page once. The second time you click on a link the following error shows up: Error: Uncaught (in promise): SyntaxError: The string did not match the expected pattern…
cerealex
  • 1,649
  • 4
  • 17
  • 37
2
votes
0 answers

Angular 6, Routing not working after deployment user http-server

I have a sample web application with two page. by default it will load login screen. When a user click activation mail, it will go to register page. Its working fine locally using ng serve. I published usingng-build and hosted using http-server page…
Mustaq
  • 121
  • 5
2
votes
1 answer

Customize routerLink in Angular 5

In my application I am using routerLink to create my link as per according to parameter passed in routerLink. Above code generate links with the userId provided, but I want to customize angular…
ankit sharma
  • 449
  • 1
  • 6
  • 17
2
votes
1 answer

Angular show page top on view

Need help! I'm using Angular 4. Where am using a sidebar as a separate component and showing the respective data on the right side of the sidebar. (i.e, if the user click link A1 on the sidebar, it should show A1's content on top to the right side…
VinoPravin
  • 947
  • 3
  • 17
  • 32
2
votes
0 answers

kendoUI angular- how to make cell hyperlink

I am using kendo UI grid in angular 6 application. In the kendo-grid-column, I want to be able to click EmployeeId and direct user to another component to show details. I am trying to use [routerLink] in anchor tag, but it is not acting as a…
SilverFish
  • 1,014
  • 6
  • 28
  • 65
2
votes
3 answers

Angular routing from one component to another

I have one component called main that has main.routing.ts as defined here: @NgModule({ imports: [ RouterModule.forRoot([ { path: 'main', component: MainComponent, canActivate: [AuthGuard], children: [{ path: '',…
rado
  • 5,720
  • 5
  • 29
  • 51
2
votes
1 answer

Use angular pipe to insert DOM clones

I'm using angular 5 and I want to dynamically clone DOM templates using a pipe:
user1884155
  • 3,616
  • 4
  • 55
  • 108
2
votes
1 answer

Create a routerLink to a child route that appears in a named

I have some named which I can navigate to by url like so: (outletname:path). I have been able to create a routerLink like so:
frankle
  • 141
  • 1
  • 15
1
vote
2 answers

Nav links not showing (bootstrap, angular)

I tried using routerLinkActive and routerLink for my nav links and it affects the display of the navigation links. =====app.component.html======
1
vote
1 answer

Angular display error banner after API error on all pages throughout the application

I have many components in angular and I am trying to display static error banner on all pages in case of GET API error related with that component. Through Interceptor I am able to get the API error but not sure how I can display banner throughout…
1
vote
0 answers

In angular whats is the whole purpose of an active route?

I tried to look in the documentation but I didn't get it fine ! I directly expected routerLinkActive directive to have default classes to just show up button as active on hover or after click
1
vote
0 answers

$event.stopPropagation() doesn't seem to prevent a directive in a parent element from receiving the event [Angular][routerLink][Directive]

EDIT: found out what was wrong; read the solution below. I wrote a directive to open the link in a new tab, and it's working wonderfully. The problem is when I put it in a table that has a link in the entire row, and an event listener in a specific…
1
vote
0 answers

After Writing in the constructor parameter the router linkstop working

follow is my code, if I emty the construction parameter thecode will work.but Likethis router linkwill not work. import { Component, OnInit } from '@angular/core'; import { AuthService } from '../auth.service'; @Component({ selector:…