3

I have a Angular app that needs to show a XML for /sitemap route.

At my controller I do a $http.get to retrieve the xml string and them I need to display this XML for this /sitemap route.

I tried several things but I could not figure out how to do this.

Please someone can help me?

2
  • Hi, have you solved this? I'm struggling with the same problem. Commented Dec 1, 2019 at 18:23
  • I am also searching for same solution.Did you get any solution? Commented Sep 15, 2020 at 10:20

1 Answer 1

-2

Just use expressions.

In your controller,

$scope.xml= responseData;

In your View(HTML) add an expression

{{xml}}
Sign up to request clarification or add additional context in comments.

1 Comment

But it would output HTML, so it won't work as a sitemap, will it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.