InnerHtml image not showing


I’m using ionic2 beta 9 and Wordpress REST API.

I’m successfully get json object from API.
I can show image using <img [src]>.

However, I cannot display the image from the blog post content using [innerHtml]. As image is exist in blog post content with

<img src="">

and also for embeded youtube video with


again, both of it is in my blog post content.

this problem only occur in mobile and not in ionic serve.

hope I can solve this ASAP. thanks.

You really shouldn’t be using innerHtml in your app.

This is a very insecure method of loading content, so angular will sanitize and strip out anything that it thinks is dangerous.

If you need to load data, you can :

  • check to see if there is alternative to the content your are getting from the API
  • Open the page in the inappbrowser window.

i can’t display ifram in innerHtml i use REST API