I know there are other questions about this, but I already tryed and nothing seems to work.
I basically have an angular variable retrieved from an $http.get . The content is html encoded, like:
Paperwhite – Human Nature
So I have to display it as
<div ng-bind-html="songrel.title.rendered"></div>
To render the html:
Paperwhite – Human Nature
I want to split this value for the - and display only
Human Nature
I tryed something like
<div ng-bind-html="songrel.title.rendered.split('–')[1]"></div>
or
<div ng-bind-html="songrel.title.rendered.split('-')[1]"></div>
Or moving the code in my app.config
$scope.showFirstBr = function(content){
return content.split('–')[1]
};
and then
<div ng-bind-html="showFirstBr(songrel.title.rendered)"></div>
but nothing seems to work. What am I missing?