Reputation: 878
I am trying to bind html to my div element, but dont really know how to do it. I am not great with angularjs, but should ng-bind-html
do the trick?
This is how I tried to do it,
<div ng-bind-html="{{tile.Info.Title}}"></div>
<div ng-bind-html="{{tile.Info.Content}}"></div>
In angular 2 its just [innerHTML]
, cant get it to work here, any suggestion?
Upvotes: 0
Views: 627
Reputation: 1135
As also suggested in comments by @Aleksey when you are using ng-
there is no need to use curly brackets {}
. So your code should be like:
<div ng-bind-html="tile.Info.Title"></div>
<div ng-bind-html="tile.Info.Content"></div>
Upvotes: 1