Currently utilizing the alpha8 router with 3 main routes:
export const appRoutes: RouterConfig = [
{ path: '', component: LandingComponent },
{ path: 'blog', component: BlogComponent },
{ path: 'posts/:id', component: PostComponent },
{ path: 'posts', redirectTo: 'blog' },
{ path: '**', redirectTo: ''}
];
While navigating from the BlogComponent, links work well to featured posts. However, when in the PostComponent, only the url address is affected by id changes. Links within the component are structured as follows:
<a [routerLink]="['/posts/'+post.id]">...</a>
For example, accessing localhost:5000/blog
successfully routes to localhost:5000/posts/19
. But transitioning from localhost:5000/posts/19
does not lead to localhost:5000/posts/20
, merely altering the url without executing contstructor
or ngOnInit
. What steps can be taken to resolve this issue?