ngx-enter-key
v1.1.0
Published
[![Build Status](https://travis-ci.org/itigoore01/ngx-enter-key.svg?branch=master)](https://travis-ci.org/itigoore01/ngx-enter-key) [![npm version](https://badge.fury.io/js/ngx-enter-key.svg)](https://badge.fury.io/js/ngx-enter-key) [![License: MIT](https
Downloads
7
Readme
ngx-enter-key
Does not trigger enter key pressed during composing input.
Installation
npm install --save ngx-enter-key
Usage
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgxEnterKeyModule } from 'ngx-enter-key';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule,
NgxEnterKeyModule
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
@Component({
selector: 'app-form',
template: `
<input (ngxEnterKey)="onEnterKey($event)">
`
})
export class FormComponent {
onEnterKey(event: KeyboardEvent) {
console.log(event);
}
}