angular-nl2br-filter

Angular 1.x filter that converts newlines to `<br>`-tags.
1 person uses it
Author: 971072?v=3 sdvg

angular-nl2br-filter Build Status

Angular 1.x filter that converts newlines to <br>-tags.

Install

NPM:

Bower:

Usage

  1. Add nl2br-filter as a dependency to your module: angular.module('app', ['nl2br-filter'])
  2. Use ng-bind-html and the nl2br filter to show a string with newlines: <p ng-bind-html="testString | nl2br"></p>

There's also a small demo for this: demo.html.

License

MIT © Stefan Dietz

comments powered by Disqus
This page was last updated over 1 year ago.