In this lesson we will create a
UiService and inside that service we create some application defaults, import the
Meta services from
@angular/platform-browser and create a function called
This function will set the metadata of the application based on the
We set some defaults and define a list with tags. We then loop over the tags and invoke the
updateTags method from the
Once our service is ready we update the
ProductDetailComponent to dynamically set the meta data by using the
tap operator in the
pipe from our Subscription.
After building and deploying the app we see that the meta data gets updated, and we can now share the app over Social Media and get rich social previews.
I was able to verify the tags on the product list and detail page. I pushed my site to now and tried the twitter validator but it failed: INFO: Page fetched successfully INFO: 3 metatags were found ERROR: No card found (Card error)
Same here, any ideas why?