Can some one please guide me with an angular issue. I have one scenario which I need to develop in angular 8, for every different URL (routing) we need link preview differently for example I am sharing some examples.
Link Perview for different routes in angular
1.3k Views Asked by Harendra Nishad At
2
There are 2 best solutions below
0

You need to either build a custom module or use a library to generate dynamic metadata per route. Consider using the library ngMeta.
Also check out a previous question about dynamically generating metadata using $routeProvider
.
You can add
og
metatags in order to performer this task. In order to add a preview to your site link, you can addog
meta tags to theindex.htlm
file like bellow. So that it will show a preview according to your data.You can use Facebook debugger tool in order to see the preview after adding these tags to the index.html page.
In order to set dynamic previews to the different pages of the app you can follow this article regarding angular meta tags.