The "ng-bind-html-unsafe" attribute is not evaluated?

508 views
Skip to first unread message

Xi Shen

unread,
Oct 25, 2012, 4:57:06 AM10/25/12
to ang...@googlegroups.com
Hi,

My AngularJS app is a Chrome extension. My code looks like:

      <li ng-repeat="i in list">
        <sapn>{{i.v1}}: </span><span id="test" ng-bind-html-unsafe="{v.getRawHTML()}"></span>
        {{w.content}}
      </li>

The "ng-repeat" attribute is evaluated correctly and my list is displayed as expected. But the span[id=test] is always empty. I tried to debug my app, and it seems the method "getRawHTML" is never invoked. It seems to me the expression "{{i.v1}}" is evaluated correctly, but why the "ng-bind-html-unsafe" attribute is not evaluated?




Thank you,
David

Xi Shen

unread,
Oct 25, 2012, 5:15:42 AM10/25/12
to ang...@googlegroups.com
It should be ng-bind-html-unsafe="v.getRawHTML()"...my fault :P
Reply all
Reply to author
Forward
0 new messages