My JSON looks like:
[
{
"Title": "MyTitle1",
"Content": "<p>Content1</p>",
"Date": "2014-11-19T10:00:00"
},
{
"Title": "MyTitle2",
"Content": "<p>Content2</p>",
"Date": "2014-11-19T00:00:00"
}
]
I'm getting it in my controller like this:
app.controller('NewsfeedCtrl', function ($scope, $http) {
$http.get(serverAddress + '/api/newsfeed/page/1').
success(function (data, status, headers, config) {
$scope.newsfeeds = data;
}).
error(function (data, status, headers, config) {
console.log("Smth went wrong.");
});
});
And bind it in view:
<div ng-controller="NewsfeedCtrl">
<div ng-repeat="newsfeed in newsfeeds">
{{newsfeed.Title}}
<br />-
<br />{{newsfeed.Date}}
<br />-
{{newsfeed.Content}}
</div>
</div>
But if I have HTML tags in Content, how can I have it also binded to view with that tags parsed.