Created
February 1, 2018 06:52
-
-
Save buildmotion/fcec1f9713ee7af43b699e73397062eb to your computer and use it in GitHub Desktop.
MarkdownEditorModule.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { EditorComponent } from './editor/editor.component'; | |
import { MarkdownEditorOptions } from './markdownEditorOptions'; | |
@NgModule({ | |
imports: [ | |
CommonModule | |
], | |
declarations: [EditorComponent], | |
exports: [ | |
EditorComponent | |
] | |
}) | |
export class MarkdownEditorModule { | |
/** | |
* A static method to provide configuration to the [MarkdownEditorModule]. | |
*/ | |
static forRoot(config: MarkdownEditorOptions) { | |
return { | |
ngModule: MarkdownEditorModule, | |
providers: [{provide: MarkdownEditorOptions, useValue: config}] | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment