ngx-multiline
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

ngx-multiline

build license issues

Plugin for Angular (>=7.2.0) providing a pipe to display multiline text.

Installation

For use in an existing angular project run npm install ngx-multiline.

Now add the installed module to your app.module.ts:

import { MultilineModule } from 'ngx-multiline';
 
// ...
 
@NgModule({
  // ...
  imports: [
    // ...
    MultilineModule
  ]
  // ...
})
export class AppModule { }

Usage

Anywhere in your template:

<div [innerHtml]="somePreformattedText | multiline"></div>

The pipe will transform every \n to a <br/>. Every \n\n will result in a </p><p>. The plugin does work for Windows end-of-line sequence \r\n as well.

License

MIT - Vinado - Built with ❤️ in Dresden

Package Sidebar

Install

npm i ngx-multiline

Weekly Downloads

10

Version

1.2.0

License

MIT

Unpacked Size

43 kB

Total Files

23

Last publish

Collaborators

  • vinado