title: submitting a form in ionic 4
body: <p>I am using ionic 4.12.  I have the following code for the form:</p>
  
  <pre><code>&lt;ion-content padding&gt;
      &lt;form  #form="ngForm" (ngSubmit)="submitForm(form)"&gt;
        &lt;ion-item&gt;
          &lt;ion-label&gt;Guest Name&lt;/ion-label&gt;
          &lt;ion-input  name="guestname" type="text" placeholder="Guest Name" ngModel&gt;&lt;/ion-input&gt;
        &lt;/ion-item&gt;
        &lt;ion-item&gt;
          &lt;ion-label&gt;Host Name&lt;/ion-label&gt;
          &lt;ion-input  name="host_name" type="text" placeholder="Host Name" ngModel&gt;&lt;/ion-input&gt;
        &lt;/ion-item&gt;
        &lt;button type="submit" block ion-button&gt;Register Guest&lt;/button&gt;
      &lt;/form&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>and here is the ts file:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  @IonicPage()
  @Component({
    selector: 'page-register-guest',
    templateUrl: 'register-guest.html',
  })
  export class RegisterGuestPage {
  
    constructor(public navCtrl: NavController, public navParams: NavParams) {
  
    }
    public submitForm(form){
      console.log("form submitted YAY");
    }
  }
  </code></pre>
  
  <p>When pressing the submit button, nothing is logged in the console.  I think the maybe methods from the ts file are not accesible in the view.  When I try <code>&lt;button (click)="test"&gt;test&lt;/button&gt;</code> and setup a method called test to just <code>console.log</code>, nothing happens.  How should I fix this?</p>