ng2-trim-directive-dev
v0.0.4
Published
[](https://travis-ci.org/anein/angular2-trim-directive) [](https://www.npmjs.com/package/ng2-trim-directive)
Maintainers
Readme
ng2-trim-directive
The directive trims whitespaces from the end of an input text value.
Usage
- Install
ng2-trim-directive.
npm i ng2-trim-directive- Import
ng2-trim-directiveto your Angular module.
import { InputTrimModule } from 'ng2-trim-directive';
@NgModule({
imports: [
...
InputTrimModule,
...
],
...[Deprecated] 2. Add the directive to your module 'declarations' section.
@NgModule( {
...
declarations: [ ..., InputTrimDirective ],
...
} )- Add the "trim" attribute to a text input element.
<input type="text" trim />or with an option: trim value only on the blur event.
<input type="text" trim="blur" />Good luck.
