Pasvaz/bindonce

bo-html not outputting HTML when there is HTML

rkoberg opened this issue · 2 comments

I have a template like:

<div bindonce class="page">
  <h1 class="page-title" bo-html="page.data.pageTitle"></h1>
  page.data.content: {{page.data.content}}
  <div bo-html="page.data.content"></div>
</div>

The title, which is just text, outputs as expected.

The "page.data.content: {{page.data.content}}" outputs the HTML as expected, for example:

page.data.content: <div> <div class="body"> <p>This is a global post body by admin</p> </div> </div>

But "<div bo-html="page.data.content"></div>" does nothing.

Don't know if this matters, but have set globally:

    $sceDelegateProvider.resourceUrlWhitelist([
      'self',
      ENV.apiEndPoint
    ]);

Here is a simple plunker showing the problem:

http://plnkr.co/edit/9MUto6?p=preview

Basically, bo-html does not work with JSON from a GET request. I assume I am doing something wrong or missing something

Ahh, I get it. I needed to resolve it first. Here is a working plunker:

http://plnkr.co/edit/UPnVGrCJA1eSoDvjt2ED?p=preview