How can i get the URL value from a SafeResourceUrl (

Viewed 957

I cannot believe this question has not been asked. I'm either the first, or there's a good reason it is not in the SO DB already.

I have a sanitized URL, that is now a SafeResourceUrl object. I can log the damned thing and see my URL, but if i try and extract the URL, i get errors and xss reference links.

for example(from the console.log(safeUrl)):

SafeResourceUrlImpl {changingThisBreaksApplicationSecurity: "https://www.index.html"}

I'm new in Angular so please forgive if a dumb question. I have tried targeting the SafeResourceUrlImpl as a property of my variable that holds the SafeResourceurl object, i have tried targeting the changingThisBreaks... key. I know this value type is something different than a standard object and there is probably an easy way to do it.

can someone help me, or better yet explain what i lack in knowledge about this mystical value type.

thanks!

0 Answers
Related