I have encountered a need to serve an XML file via a path in an angular application. I need to somehow return the xml file in the same way as if it was fetched from the assets folder, but I need to make changes in the file, so it cannot be static. So I need to somehow return a custom response containing generated xml content when a certain URL is accessed. How do i accomplish this? I thought about rendering the file as a component, but since that would also return the contents of the root component with the router outlet that doesn't really work. I dont see a way to simply have the router return arbitrary data on a certain route, so that does not appear to be a valid path either. Any ideas? Continue reading...