Nanthagopal
Nanthagopal

Reputation: 229

dynamically update og meta tags in angular

I want to share some dynamic content to WhatsApp, the dynamic content gets from an API. therefore I used the angular Meta class in my component.ts file to update the default meta tag property in index.html with the dynamic content.

Upvotes: 6

Views: 5075

Answers (1)

Alexandre Lotte
Alexandre Lotte

Reputation: 11

You could try the meta tags validator here: https://thumbsmith.com/validator/

Also make sure that the dynamic (per page) content is available server-side, and not just client-side.

A quick trick to easily check the server-side HTML is to can prepend view-source: to the URL in chrome or right-click > view page source.

Upvotes: 1

Related Questions