11import { Component , OnInit , inject } from '@angular/core' ;
22import { UntypedFormControl , Validators , ReactiveFormsModule } from '@angular/forms' ;
3- import { MatDialog , MatDialogRef } from '@angular/material/dialog' ;
3+ import { MatDialog , MatDialogContent , MatDialogRef } from '@angular/material/dialog' ;
44import { MatCardHeader , MatCardTitle , MatCardSubtitle , MatCardContent } from '@angular/material/card' ;
55import { MatFormField } from '@angular/material/form-field' ;
66import { MatInput } from '@angular/material/input' ;
77import { MatButton } from '@angular/material/button' ;
88
99@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 ]
1515} )
1616export class NewTopicDialogComponent implements OnInit {
1717 private ref = inject < MatDialogRef < NewTopicDialogComponent > > ( MatDialogRef ) ;
@@ -22,9 +22,9 @@ export class NewTopicDialogComponent implements OnInit {
2222 ngOnInit ( ) : void {
2323 }
2424
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 } )
2828 }
2929 }
3030
0 commit comments