title: Angular 8 forms, ngSubmit returns empty data object
body: <p>I'm fairly new to Angular and front-end development in general, but I dont understand why does onSubmit method doesnt get the values I put in, in input boxes, I've done it acording to the Angular forms tutorial, but it doesnt work.</p>
  
  <p>What im trying to do here is to make a book object and send it to my API through http post method, but the form returns empty values.</p>
  
  <p>my component.html form.</p>
  
  <pre><code>&lt;form [formGroup]="book" (ngSubmit)="onSubmit(book.value)"&gt;
          &lt;label&gt;Title&lt;/label&gt;
          &lt;input type="text" name="title"&gt;
  
          &lt;label&gt;Author&lt;/label&gt;
          &lt;input type="text" name="author"&gt;
  
          &lt;label&gt;Release Date&lt;/label&gt;
          &lt;input type="text" name="releasedate"&gt;
  
          &lt;label&gt;Page Count&lt;/label&gt;
          &lt;input type="number" name="pagecount"&gt;
  
      &lt;div class="form-group col-md-8 offset-md-2"&gt;
          &lt;button type="submit" class="btn btn-lg btn-block"&gt;Add&lt;/button&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>my component.ts</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Router } from '@angular/router';
  import { ToastrService } from 'ngx-toastr';
  import { NgForm } from '@angular/forms';
  import { HttpClient } from '@angular/common/http';
  import {FormBuilder } from '@angular/forms';
  
  @Component({
    selector: 'app-addbook',
    templateUrl: './addbook.component.html',
    styles: []
  })
  export class AddbookComponent implements OnInit {
  
    book;
    constructor(private router: Router, private http:HttpClient, private formBuilder: FormBuilder) {
      this.book = this.formBuilder.group({
        title: '',
        author: '',
        releasedate: '',
        pagecount: ''
      });
     }
     readonly BaseURL= 'https://localhost:5001/api';
  
    ngOnInit() {
    }
  
    onSubmit(Data)
    {
        var body = {
          title: this.book.value.title,
          author: this.book.value.author,
          releasedate: this.book.value.releasedate,
          pagecount: this.book.value.pagecount
        };
        return this.http.post(this.BaseURL + '/Booklist', body);
    }
  }
  </code></pre>
  
  <p>Thank you for your help.</p>