Skip to content

Instantly share code, notes, and snippets.

@realtomaszkula
Last active July 27, 2018 15:25
Show Gist options
  • Save realtomaszkula/4706e3fcfed808bfdd75b3c0b875837f to your computer and use it in GitHub Desktop.
Save realtomaszkula/4706e3fcfed808bfdd75b3c0b875837f to your computer and use it in GitHub Desktop.
@NgModule({
imports: [CommonModule, FormsModule],
declarations: [ValidationBorderDirective],
exports: [ValidationBorderDirective]
})
export class ValidationBorderModule {
static forRoot(config: ValidationBorderConfig): ModuleWithProviders {
return {
ngModule: ValidationBorderModule,
providers: [{ provide: VALIDATION_BORDER_CONFIG, useValue: config }]
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment