Questions tagged [angular-routerlink]

220 questions
0
votes
2 answers

Angular 14 : Header buttons disappear when routeLink added inside tag for redirecting to a page

I am facing an issue while creating a link for header buttons. I created the header using below code snippet for the project. When I add routeLink inside the tag for the [home and Countries] button, both buttons disappear from the head. If I…
ritik
  • 1
  • 1
0
votes
2 answers

Prevent routerlink being triggered from specific child elements

I have something like: {{ recipe.name }}
Adam Jones
  • 13
  • 1
  • 1
  • 6
0
votes
1 answer

angular universal ssr routing with params not working after initialNavigation

I'm having issue with path param routing, where navigation works fine for any one of the category traversed first but routing doesn't work from one category to the other, even though the url in the browser updates. refreshing the browser loads the…
0
votes
1 answer

Angular scroll top after route changes interfere with relative url changes

I have enabled the scrollPositionRestoration in my app-routing module as it follows: imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'enabled' })] But this creates conflicts when I try to make the user scroll to the page with…
Igor Cantele
  • 387
  • 1
  • 10
0
votes
1 answer

url path variable in angular

How get variable from url path variable in angular2(v12) path: 'shop/:id', <-- get id from here component: RedirectGuard, canActivate: [RedirectGuard], data: { externalUrl: `https://example.com/shop/:id` <-- set id to here }
0
votes
1 answer

How to append prefix to Angular RouterLink

At the moment in my app, when navigate I'm doing like this: Home About History Team ... As you can see, I'm repeating /app…
0
votes
2 answers

RouterLink page displays nothing

Please assist, I just started learning angular and I'm having issues with my routerLink page.When I click on the routerLink it takes me to the page but displays blankpage but when I open the developer tools the page displays. what could be the…
0
votes
1 answer

Angular Routes are used with proper folder structure but still some components are loading below the others

I am trying to build a shopping application but I am facing an issue that although Angular Routes are used with proper folder structure but still some components is loading below the others. Below is my folder/components…
user19471557
0
votes
0 answers

How to create dynamic URLs using routing in Angular 13?

I have a blog project in which I have a post-detail component but the URL is static. I want to add the post title to the URL to make it dynamic for each post. If this is possible for you then please add related code also.
0
votes
0 answers

How to define routes for loading previous component from the url which is having data?

Following are my routes const routes: Routes = [ { path: 'nav', component:NavComponent, children:[ { path: 'basic-profile', component: BasicProfileComponent }, { path: 'search', …
0
votes
0 answers

Can I use Angular routing with a parameterized component constructor, and if so, how?

I am trying to incorporate angular's routing module into an existing Angular project. I have three components that are each linked to a path in my Routes object in app.module.ts. const appRoutes: Routes = [ { path: 'home', component:…
0
votes
1 answer

How to refresh the page in angular with routerlink and id

I have an angular application In that I have some navigation of routerlinks My requirement is if the user page is already open with some Id ,and if the condition satisfies in then it has to navigate to that particular ID user page from the existing…
0
votes
1 answer

How to use anchor link in angular without changing the url in angular?

I trying to navigate from a.class1 to div.class2. But the URL is changing when the link is called. So when trying to back page, it goes back to the current page on another section. ...