.filter('linebreakFilter', function () { return function(text) { if (text) return text.replace(/\n/g, '<br />'); return text; }; });Then to use it:
<div ng-bind-html="vm.album.Description | linebreakFilter"></div>+++ Rick ---
><div class="alert alert-danger" ng-show="alertType === 'serverError'"> > <button type="button" class="close" ng-click="alertType=''" data-dismiss="!alertType==='serverError'"> > <span aria-hidden="true">×</span><span class="sr-only">@Labels.close</span></button> > <i class="fa fa-exclamation-circle fa-2x"></i> > {{ alertMessage }} > </div>>
>throw new HttpResponseException( > Request.CreateErrorResponse(HttpStatusCode.InternalServerError, response)); > >>