1.0.1 • Published 6 years ago

ngx-trim v1.0.1

Weekly downloads
233
License
MIT
Repository
github
Last release
6 years ago

npm GitHub release npm

ngx-trim

This project was generated with Angular CLI version 6.0.1.

Demo: https://stackblitz.com/github/maxisam/ngx-trim

Installation

To install this library, run:

$ npm install ngx-trim --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install ngx-trim

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
// Import the library
import { NgxTrimModule } from 'ngx-trim';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    // Import the library
    NgxTrimModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}

Once your library is imported, you can use its components, directives and pipes in your Angular application:

<!-- You can now use your library component in app.component.html -->

<input type="text"  placeholder="input" [(ngModel)]="testInput" ngxTrim>

Features

Trim text after input event, focusout or keyup.

You can set it as ngxTrim='focusout' or

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

Acknowledgement

This project uses generator-angular2-library

License

MIT © Sam Lin

1.0.1

6 years ago

1.0.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago