I need to display string with line break.
I have object:
"test": {
    "test1": 5,
    "test2": 6
 }
Now I need display something like this:
test1 - 5
test2 - 6
So I use:
$scope.displayString = _.keys(test).map(function(key) {
    return (key + '-' + test[key])
}).join('\n')
But on view I have still string in one line, like:
test1 - 5 test2 - 6
It looks like I replace comma for one space, but I would like to have line break. How can I solve it? Thanks for any tip!
I don't want to use jQuery, I want pass $scope.displayString to my html (for tooltip).
 
     
     
     
     
    
' instead of '\n' – Poul Bak Aug 08 '18 at 17:28