Home > Net >  Angular universal. Dynamic routes are not rendered server-side
Angular universal. Dynamic routes are not rendered server-side

Time:12-31

I have problem with Server-side rendering dynamic routes with angular universal.

for example:

{ path: 'room/:slug', Component: RoomDetailsComponent }

will not be server side rendered.

{ path: 'room/first-room', Component: RoomDetailsComponent }

will be server side rendered.

I found some solutions for this, like fetching the routes from back-end service. I think there should be better, less hackier way of doing this

CodePudding user response:

Maybe you are missing a property int the RouterModule declaration, because that should work as expected.

Here I create a param rendered in server

  • Related