1
1
import { Component , OnInit , inject } from '@angular/core' ;
2
2
import { UntypedFormControl , Validators , ReactiveFormsModule } from '@angular/forms' ;
3
- import { MatDialog , MatDialogRef } from '@angular/material/dialog' ;
3
+ import { MatDialog , MatDialogContent , MatDialogRef } from '@angular/material/dialog' ;
4
4
import { MatCardHeader , MatCardTitle , MatCardSubtitle , MatCardContent } from '@angular/material/card' ;
5
5
import { MatFormField } from '@angular/material/form-field' ;
6
6
import { MatInput } from '@angular/material/input' ;
7
7
import { MatButton } from '@angular/material/button' ;
8
8
9
9
@Component ( {
10
- selector : 'app-new-topic-dialog' ,
11
- templateUrl : './new-topic-dialog.component.html' ,
12
- styleUrls : [ './new-topic-dialog.component.scss' ] ,
13
- standalone : true ,
14
- imports : [ MatCardHeader , MatCardTitle , MatCardSubtitle , MatCardContent , MatFormField , MatInput , ReactiveFormsModule , MatButton ]
10
+ selector : 'app-new-topic-dialog' ,
11
+ templateUrl : './new-topic-dialog.component.html' ,
12
+ styleUrls : [ './new-topic-dialog.component.scss' ] ,
13
+ standalone : true ,
14
+ imports : [ MatCardHeader , MatCardTitle , MatCardSubtitle , MatCardContent , MatFormField , MatInput , ReactiveFormsModule , MatButton , MatDialogContent ]
15
15
} )
16
16
export class NewTopicDialogComponent implements OnInit {
17
17
private ref = inject < MatDialogRef < NewTopicDialogComponent > > ( MatDialogRef ) ;
@@ -22,9 +22,9 @@ export class NewTopicDialogComponent implements OnInit {
22
22
ngOnInit ( ) : void {
23
23
}
24
24
25
- submit ( ) : void {
26
- if ( this . topicName . valid ) {
27
- this . ref . close ( { newTopic : this . topicName . value } )
25
+ submit ( ) : void {
26
+ if ( this . topicName . valid ) {
27
+ this . ref . close ( { newTopic : this . topicName . value } )
28
28
}
29
29
}
30
30
0 commit comments