Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding dynamic sitemap to an angularJS application

I'm working on an AngularJS application which creates a lot of dynamic content, for example: Every time a new user is created a new link is generated, etc.

Question:

How can I manage all this in a sitemap, and is there any tool for automatically generating sitemaps in AngularJS? Do I have to update my sitemap each time a new user is registered?

like image 725
Muhammad Ahsan Avatar asked Oct 31 '22 01:10

Muhammad Ahsan


1 Answers

So, I solved this problem by generating the sitemap at back end (Rest API) instead of Angular. I created a rest end point to generate a new sitemap, and return that in the form of an xml file. When the new sitemap was generated it contained all new dynamic urls, and there was no need to add a new url each time some content was updated

like image 126
Muhammad Ahsan Avatar answered Nov 08 '22 06:11

Muhammad Ahsan