angular-nl2br

An angular filter that turns new lines into line breaks


Keywords
angularjs
License
MIT
Install
bower install angular-nl2br

Documentation

angular nl2br

Note This project is no longer actively maintained! If you've got questions or concerns about it, feel free to ask in the issues, but expect no changes or improvements to the code.

Build Status

An angular filter that turns new lines into line breaks

var m = angular.module('yourModule'  ['nl2br']);

m.controller('parrot', function($scope) {
  $scope.text = "AWWWWWK!\n\nPolly want a cracker?\n\nAWWWWK!"
});
<div ng-controller='parrot'>
  <p>{{text|nl2br}}</p>
</div>

Installing

npm install angular-nl2br

or

bower install angular-nl2br

License

MIT