0.0.1 • Published 7 years ago

ngx-truncate v0.0.1

Weekly downloads
51
License
MIT
Repository
github
Last release
7 years ago

NgxTruncate

GitHub issues GitHub stars GitHub forks GitHub license

Required

  • node v8.4.0
  • npm v5.5.1
  • typescript v2.3.3
  • Angular: 4.2.4
  • Angular CLI: 1.5.0

install

npm install ngxtruncate --save

Module

import { NgXtruncateModule } from 'ngxtruncate';

@NgModule({
  imports: [
    NgXtruncateModule
  ],
})

HTML

// app.html
{{ 'a simple test variable' | ngXtruncate}}
{{ 'a simple test variable' | ngXtruncate:8}}
{{ 'a simple test variable' | ngXtruncate:8:'.'}}

Note

This pipe removes all html tags, using the regex /<[^>]+>/gm

Build for developer

Only use if you change the component

Build

npm run build

Publish

npm publish

Changelog

All versions below 1.0.0 are beta