title: Angular 6 : ERROR Error: Argument non valide while insert
body: <p>While working with angular6, i have a form that i want to submit to insert an object with some fields.</p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;form name="form" (ngSubmit)="f.form.valid" #f="ngForm" validate&gt;
  &lt;div class="form-group row"&gt;
    &lt;label for="inputEmail3" class="col-sm-2 col-form-label"&gt;book Name&lt;/label&gt;
    &lt;div class="col-sm-10"&gt;
      &lt;input type="text"
             class="form-control"
             [(ngModel)]="book.libelle"
             #libelle="ngModel"  
             minlength="4" 
             required  
             class="form-control"
             id="libelle" 
             name="libelle"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="card-footer"&gt;
    &lt;button type="submit"  
           class="btn btn-sm btn-primary" 
           (click)="saveBook(book)" 
           prevent-double-submit&gt;
      &lt;i class="fa fa-dot-circle-o"&gt;&lt;/i&gt; save
    &lt;/button&gt;      
  &lt;/div&gt;
  </code></pre>
  
  <p>In my book model the field is named lebelle.</p>
  
  <p>ts piece of for insert :</p>
  
  <pre><code> public saveBook(newBook:Book) {
     return this.bookService.saveBookService(this.book)
       .subscribe((reponseService: ReponseService) =&gt; {
      this.reponseService = new ReponseService(reponseService);
      this.messageErreur = new MessageErreur(this.reponseService.recupererMessageErreur());
      if (this.messageErreur.contientErreur()) {
        this.alertStyle = Constantes.ALERT_PRIMARY_RED;
      } else {
        this.alertStyle = Constantes.ALERT_PRIMARY_GREEN;
        this.router.navigateByUrl("/BaseUrl?messageErreur.code=" + this.messageErreur.code + "&amp;messageErreur.message=" + this.messageErreur.message + "&amp;alertStyle=" + this.alertStyle);
      }
    });
  }
  </code></pre>
  
  <p>Thanks for your suggestions</p>