import { NgModule } from '@angular/core' ; import { ReactiveFormsModule , FormsModule , COMPOSITION_BUFFER_MODE } from '@angular/forms' ; import { CommonModule } from '@angular/common' ; import { Ng2DropdownModule } from 'ng2-material-dropdown' ; import { HighlightPipe } from './core/pipes/highlight.pipe' ; import { DragProvider } from './core/providers/drag-provider' ; import { OptionsProvider , Options } from './core/providers/options-provider' ; import { TagInputComponent } from './components/tag-input/tag-input' ; import { DeleteIconComponent } from './components/icon/icon' ; import { TagInputForm } from './components/tag-input-form/tag-input-form.component' ; import { TagComponent } from './components/tag/tag.component' ; import { TagInputDropdown } from './components/dropdown/tag-input-dropdown.component' ; import { TagRipple } from './components/tag/tag-ripple.component' ; const optionsProvider = new OptionsProvider ( ) ; @ NgModule ( { imports : [ CommonModule , ReactiveFormsModule , FormsModule , Ng2DropdownModule ] , declarations : [ TagInputComponent , DeleteIconComponent , TagInputForm , TagComponent , HighlightPipe , TagInputDropdown , TagRipple ] , exports : [ TagInputComponent , DeleteIconComponent , TagInputForm , TagComponent , HighlightPipe , TagInputDropdown , TagRipple ] , providers : [ DragProvider , { provide : COMPOSITION_BUFFER_MODE , useValue : false } , ] } ) export class TagInputModule { name param options { Options } public static withDefaults ( options ) { optionsProvider . setOptions ( options ) ; } }