Angular SEO optimization for parameterized routes with Angular Universal

Viewed 19

Are there any ways to make parameterized routes like 'blog/:categoryId' SEO friendly? The idea in my app: component gets categoryId parameter, makes api request to the server-side project (.net core web api) and after getting the results of the request, updates meta, adding description and keywords, because the response of the request contains information about category.

As I know, Angular Universal can help with it, because this library turns components to html pages. The problem is my application just stuck on the prerendering process (see the images below). Moreover, if i try to run npm run dev:ssr, I get infinite page loading on localhost:4200 after the application compilation with no errors.

app.module.ts app.module.ts

angular.json

angular.json

Infinite prerendering infinite prerendering

Infinite app loading on localhost:4200 infinite loading on localhost:4200

0 Answers
Related