|
@@ -25,6 +25,7 @@ import { textbookServer } from '../../../../services/textbook';
|
|
|
import * as eduTextBook from '../../../../services/EduTextbook'
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
import { Router } from '@angular/router'
|
|
|
+import { FormBuilder} from '@angular/forms';
|
|
|
|
|
|
|
|
|
|
|
@@ -38,7 +39,7 @@ import { Router } from '@angular/router'
|
|
|
NzCheckboxModule,
|
|
|
NzTableModule,
|
|
|
NzUploadModule,
|
|
|
- CompUploadComponent,DatePipe,
|
|
|
+ CompUploadComponent,DatePipe
|
|
|
],
|
|
|
standalone: true,
|
|
|
selector: 'app-faith',
|
|
@@ -65,14 +66,15 @@ export class FaithComponent implements OnInit {
|
|
|
private msg: NzMessageService,
|
|
|
private modal: NzModalService,
|
|
|
private http: HttpClient,
|
|
|
- private router: Router
|
|
|
+ private router: Router,
|
|
|
+ private formBuilder: FormBuilder
|
|
|
) { }
|
|
|
ngOnInit() {
|
|
|
if (this.eduTextbook.id) {
|
|
|
this.unitMaterial = this.eduTextbook?.get('unitMaterial') || this.unitMaterial
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ value:string=''
|
|
|
|
|
|
|
|
|
async submitForm(event?: string): Promise<void> {
|
|
@@ -152,5 +154,10 @@ export class FaithComponent implements OnInit {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+ form: FormGroup<{
|
|
|
+ comment: FormControl<string | null>;
|
|
|
+ }> = this.formBuilder.group({
|
|
|
+ comment: ['', [Validators.maxLength(100)]]
|
|
|
+ });
|
|
|
+
|
|
|
}
|