Archived
comments
This commit is contained in:
1 parent
368cf265c5
commit
d035328d84
32 files changed
+427
-44
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { ButtonModule } from 'primeng/button';
|
||||
import { CardModule } from 'primeng/card';
|
||||
import { InputTextModule } from 'primeng/inputtext';
|
||||
import { InputTextareaModule } from 'primeng/inputtextarea';
|
||||
import { CommentFormComponent } from './components/comment-form/comment-form.component';
|
||||
import { CommentComponent } from './components/comment/comment.component';
|
||||
import { CommentsComponent } from './components/comments/comments.component';
|
||||
import { CommentService, commentTypeToken } from './services/comment.service';
|
||||
|
||||
@NgModule({
|
||||
declarations: [CommentsComponent, CommentComponent, CommentFormComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
CardModule,
|
||||
InputTextModule,
|
||||
ButtonModule,
|
||||
InputTextareaModule,
|
||||
ReactiveFormsModule,
|
||||
],
|
||||
exports: [CommentsComponent],
|
||||
providers: [CommentService],
|
||||
})
|
||||
export class CommentModule {
|
||||
static forRoot(
|
||||
commentType: 'solution' | 'issues'
|
||||
): ModuleWithProviders<CommentModule> {
|
||||
return {
|
||||
ngModule: CommentModule,
|
||||
providers: [{ provide: commentTypeToken, useValue: commentType }],
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user