Hey guys,
I have an issue with the *ng-bind-html* attribute, it's working fine i
Chrome but not in IE8
I've got some json data which has to be rendered as html. My code looks
like this:
*Mark-up*
<article class="coll coll2 padding40">
<h2
class="margin20-b">{{spot.contents[$index]['header']}}</h2>
<h3
class="margin20-b">{{spot.contents[$index]['subheader']}}</h3>
<p ng-bind-html="item.description"></p>
</article>
*Javascript*
(function(){
var app = angular.module('sweetspot', ['ngSanitize']);
app.controller('SpotController', ['$http', '$scope', '$sce',
function($http, $scope, $sce)
{
var spot = this;
spot.contents = [];
$http.get('json/data.json').success(function(data)
{
spot.contents = data;
});
$scope.selectedIndex;
$scope.itemClicked = function($index)
{
$scope.selectedIndex = $index;
}
}]);
})();
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.