Answer the question
In order to leave comments, you need to log in
Routing Angular not working?
Hello. After logging into the system, a certain AdvancesPageComponent page (the /advances route) should be shown to the user, this page is a table, by clicking on the cell, a specific AdvancePageComponent (/advances/:id) should be opened. Also on the AdvancesPageComponent page there is a button
<button
color="primary"
class="mr-2"
mat-raised-button
routerLink="new-advance"
>
New Advance
</button>
export const routes: Route[] = [
{
path: '',
component: AdminPortalLayoutComponent,
children: [
{
path: '',
component: AdvancesPageComponent,
canActivate: [IsLoggedInGuard],
},
{
path: ':id',
component: AdvancePageComponent,
canActivate: [IsLoggedInGuard],
},
{
path: 'new-advance',
component: NewAdvancePageComponent,
canActivate: [IsLoggedInGuard],
},
],
},
];
<router-outlet></router-outlet>
Answer the question
In order to leave comments, you need to log in
Because your new-advance line matches :id from the previous route. Move the object for that path up in the array.
I would take the second one. Of course, the absence of an HDD is embarrassing, but with an SSD you will feel the difference in performance.
HP Pavilion 15-bc206ur Core i5, 16GB RAM, 2TB HDD + 128 SSD, nVidia GeForce GTX 1050.4GB or Lenovo Legion Y520-15IKBN Core i5, 1TB HDD + 128 SSD, 16GB RAM, nVidia GeForce GTX 1050, 4 GB. All these laptops can’t be played for 3 years ahead, and if you don’t play then: Asus ZenBook UX310UA - Core i7, 16GB RAM, 1TB + 128 SSD, Intel HD Graphics 520 or Lenovo IdeaPad 320-15IKB - Core i7, 16GB RAM, 512 SSD, nVidia GeForce GT 940MX, 2 GB.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question