Last active
December 13, 2018 03:29
-
-
Save alex-okrushko/c2f688e96c562a0d6d7500fe34bc1df3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @Component({ | |
| templateUrl: './add_comment_dialog.ng.html', | |
| changeDetection: ChangeDetectionStrategy.OnPush, | |
| }) | |
| export class AddCommentDialog { | |
| comment: FormControl; | |
| constructor( | |
| readonly dialogRef: MatDialogRef<AddCommentDialog>, | |
| @Optional() @Inject(MAT_DIALOG_DATA) readonly errorPayload?: | |
| AddCommentErrorPayload, | |
| ) { | |
| this.comment = new FormControl('', [Validators.required]); | |
| if (this.errorPayload) { | |
| this.comment.setValue(this.errorPayload.errorComment); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment