Facebook share for dynamic pages in angular.

29 views
Skip to first unread message

Faizan Malik

unread,
Sep 17, 2020, 8:08:13 AM9/17/20
to Angular and AngularJS discussion
Hi Guys,

Facebook share is not working in angular 8. When i share my page its get the meta description and title from index file not that meta tags which i used dynamically and updated them by this "this.metaService.updateTag" because SPA render in DOM but facebook bots didn't render the javascript/
Is there any way to share dynamic page on facebook ?

bastien lemaire

unread,
Sep 17, 2020, 8:39:42 AM9/17/20
to ang...@googlegroups.com
You could try to use pre-rendering or server-side rendering. This is specifically designed for SEO problems with angular applications.



Bastien Lemaire


--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/53f3dc05-6db1-47e0-a1fb-aba18d3cc89dn%40googlegroups.com.

Asad Fiaz

unread,
Sep 23, 2020, 1:52:50 AM9/23/20
to ang...@googlegroups.com
Hi Faizan,

You can try to use Server Side Rendering. You can write a node script that will render your angular application and then the above mentioned issue will automatically be resolved. For further research, you can look into this link https://www.digitalocean.com/community/tutorials/angular-angular-universal.

Thanks and Regards
Asad Fiaz
Senior Front-end Engineer

--
Reply all
Reply to author
Forward
0 new messages