How we can generate sitemap.xml in angular dynamically

Viewed 3120

I have provided an API(in nodejs) returns a list of products in order to add to sitemap.xml

I have a file named sitemap.xml in the src folder in my angular project. How we can add a list of product to sitemap.xml

URL:

xxx.com/sitemap.xml (now it's empty)

<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

<url>
</url>

</urlset>
0 Answers
Related