UNPKG

@yehia2amer/ngx-inline-editor

Version:

Follow me [![twitter](https://img.shields.io/twitter/follow/carlillo.svg?style=social&label=%20carlillo)](https://twitter.com/carlillo) to be notified about new releases.

31 lines (29 loc) 909 B
import { NgModule, ModuleWithProviders } from '@angular/core'; import { InlineEditorComponent } from './ngx-inline-editor.component'; import { ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; import { INLINE_EDITOR_INPUTS, INLINE_EDITOR_CONFIG } from './common/index'; import { InputTextConfig } from './inputs/src/text/input-text.config'; @NgModule({ declarations: [InlineEditorComponent], imports: [CommonModule, ReactiveFormsModule], exports: [InlineEditorComponent] }) export class InlineEditorModule { static forRoot(config?: InputTextConfig): ModuleWithProviders { return { ngModule: InlineEditorModule, providers: [ { provide: INLINE_EDITOR_INPUTS, useValue: {}, multi: true }, { provide: INLINE_EDITOR_CONFIG, useValue: config } ] }; } }