S
S
Slimlink32019-05-15 22:38:40
Angular
Slimlink3, 2019-05-15 22:38:40

How to update meta tags in Angular Universal after receiving an API response?

There is an Internet resource that consists of two parts:
Back-end - distributes information through the API
Front-end - Angular with a working SSR (Angular Universal via the pm2 server)
Problem:
Despite the fact that the content is generated on the server (Angular Universal works like normally), SEO robots finish processing the page even before the necessary keywords come from the back-end.
And at the output we get not updated meta tags, which means the absence of seo as such.
An example of update code that should have time to be processed before the seo robot finishes receiving a response:

this.meta.updateTag({name: "keywords", content: this.post["get_tags_display"]});

Please help me fix the problem.
PS: Here a person has been trying to solve this problem for half a year.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question