Questions tagged [angular-routerlink]
220 questions
-1
votes
1 answer
when clicking on the routerLink angular throws ASSERTION ERROR
This is my first angular 8 application, and now when I am trying to setup routerlinks and when I click on the links I get from the google console the error:
Error: ASSERTION ERROR: Provided Component class doesn't contain Component definition.…

user2631359
- 3
- 3
-1
votes
1 answer
routerLink doesn't rendered into my Angular app, why?
I am working on an Angular application trying to introducing routing.
Into my app.component.html page I have this:
the problem is that into…
My cool app

AndreaNobili
- 40,955
- 107
- 324
- 596
-1
votes
1 answer
Angular - Active Class not being applied
Routes
{ path: 'profile', component: ProfileComponent },
{ path: 'profile/about', component: AboutComponent },
// otherwise redirect to home
{ path: '**', redirectTo: '' }
CSS
.active {
border-bottom: 4px solid dodgerblue…

sqpl13
- 15
- 2
-1
votes
1 answer
Angular Routing problems with Refresh
here: https://stackblitz.com/edit/planificador?file=src/app/partehoras/components/detail/detail.component.html
The first route loaded is this one
in app.module I have this
in partehoras.module I have this
When I click here
I go to this…

kintela
- 1,283
- 1
- 14
- 32
-1
votes
1 answer
Router link is being called all the time
I have the below code
routerLink="{{onSelect(id)}}.
this method is being called all the time, and when i click to go to another tab this takes over, is there anyway in angular that this function will be called only when i click or right-click(new…

userr not found
- 101
- 7
-1
votes
1 answer
Router link to scroll on top if its already on that route
Lets say I'm at the bottom of my home page and I click on my logo, Now because the logo routes me to my home page and that I'm already at my home page. It should scroll me to the top of the page. How do I implement this.
Homepage Component HTML

Ibrahim Ali
- 2,083
- 2
- 15
- 36
-1
votes
1 answer
TS2322: Type 'number' is not assignable to type 'string'
I got this TS2322 error, when i tried to build my angular app.
I have a [link]="i" where i eq index number.
When i declare it i use this: @Input() link!: string;
Link used by reference for routerLink
like this: [routerLink]="link"
if i change link!:…

Gábor Fábos
- 29
- 7
-1
votes
1 answer
RouterLink shows hyperlink on screen (below) I don't want to show hyperLink on page
Dashboard can i remove hyperlink ?
when i use
it works like what i want
but i want to add routerLinkOptions and it shows button error!
my aim is to remove hyperlink…

nupur
- 91
- 1
- 1
- 11
-2
votes
1 answer
Angular Router navigate not firing ngOninit
I'm encountering an issue where the ngOnInit is not firing when returning to a page using the Angular router navigate.
//this fires and goes to the /test/parent-route
this.router.navigate(['/test/parent-route']
however the ngOnInit does not fire in…

RDK
- 69
- 4