I have my main.controller.js
which has a simple json object within it.
$scope.sections = [
{
id: "landing",
description: "<div><img pinch-zoom src='public/img/model.png'></div>"
}
];
And in my view, I have an ng-repeat
which loops through my $scope.sections
.
<md-content>
<div ng-repeat="section in sections">
{{ section.description }}
</div>
</md-content>
However when I'm outputting {{ section.description }}
the directive attached to the img is not firing. It's almost as if it's being ignored. Here is the output -- my pinch-zoom is completely removed:
<img src='public/img/model.png'>
If I apply the directive to an image not within my ng-repeat, the directive fires just fine.
I tried the following within my ng-repeat, but to no avail.
<div ng-bind-html="section.description"></div>