While creating a Model Driven Template Reactive forms, when I create model object from Form Value. Then model object is loosing its TYPE.
For a Simple Example:
Change your class definition to
export class Book {
constructor(public name: string, public isbn: string) {}
}
Change your addBook method to
addBook() {
const { name, isbn } = this.bookFormGroup.value;
this.newBook = new Book(name, isbn);
console.log(this.newBook instanceof Book);
console.log(this.newBook);
}