I'm trying to render HTML strings that comes from an array of HTML strings, I'm quite new to AngularJS and I tried to follow the examples from the AngularJs website, but it seems I can't figure out a proper way to do that.
Here is my plunker for a better understanding, I hope I explained myself, if not just ask for more clarifications. Thanks very much in advance for any help.
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-example62-production</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-sanitize.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="bindHtmlExample">
<div ng-controller="ExampleController">
<div ng-repeat="bit in myHTML">
<p ng-bind-html="bit"></p>
</div>
</div>
</body>
</html>
CONTROLLER
(function(angular) {
'use strict';
angular.module('bindHtmlExample', ['ngSanitize'])
.controller('ExampleController', ['$scope', function($scope) {
for (i=0; i<6; i++){
$scope.myHTML[i] =
'I am an <code>HTML</code>string with ' +
'<a href="#">links!</a> and other <em>stuff</em>';
}
}]);
})(window.angular);