JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.angularjs.org/1.2.1/angular-sanitize.min.js"></script>
<body ng-app="test" ng-controller="testCtrl">
    <ul>
        <li ng-repeat="obj in objs">
            <p ng-bind-html="obj.a"></p>
         </li>
    </ul>
  
</body>

CSS

p {
    white-space: pre;
}

JavaScript

angular.module('test', ['ngSanitize'])
.controller('testCtrl', function($scope){
   var test = "hi this is a test \n sdfdsf";
       var test2 = "hi this is a test <br> sdfdsf";

    
    
    $scope.objs = [
        {a : 'test 1 <br> test 1'},
        {a : 'test 2 '},
        {a : 'test 3'},
        {a : 'test 4 \n test 4'},
        {a : 'test 5 \n test 5'},
    ]
        
        
});