Noncollinear Perpendicular Microcrystalline

    ng2-trim-directive-dev
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.4 • Public • Published

    ng2-trim-directive

    Build Status npm

    The directive trims whitespaces from the end of an input text value.

    Usage

    1. Install ng2-trim-directive.
      npm i ng2-trim-directive
    1. Import ng2-trim-directive to 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 ],
        ...
      } )
    1. 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.

    Install

    npm i ng2-trim-directive-dev

    DownloadsWeekly Downloads

    0

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • zurfyx