updated book's forms
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {NzFormModule} from "ng-zorro-antd/form";
|
||||
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-book',
|
||||
imports: [NzFormModule, NzFlexDirective, ReactiveFormsModule],
|
||||
imports: [NzFormModule, ReactiveFormsModule],
|
||||
templateUrl: './create-book.html',
|
||||
styleUrls: ['./create-book.css'],
|
||||
})
|
||||
export class CreateBook {
|
||||
createBookForm = new FormGroup({
|
||||
title: new FormControl<string>(null, [Validators.required]),
|
||||
isbn: new FormControl<string>(null, [Validators.required]),
|
||||
releaseYear: new FormControl<string>(null, [Validators.required]),
|
||||
author: new FormControl<string>(null, [Validators.required])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user