title: Get password value from the form angular 2
body: <p>I have a form</p>
  
  <pre><code>    &lt;form #f="ngForm" novalidate (ngSubmit)="changePassword(f)"&gt;
          &lt;ion-item&gt;
              &lt;ion-input type="password" placeholder="Current Password" name="currentPassword" [(ngModel)]="user.currentPassword"&gt;&lt;/ion-input&gt;
          &lt;/ion-item&gt;
          &lt;ion-item&gt;
              &lt;ion-input type="password" name="newPassword" placeholder="New Password" [(ngModel)]="user.newPassword" required validateEqual="confirmPassword" reverse="true" #newPassword="ngModel"&gt;&lt;/ion-input&gt;
          &lt;/ion-item&gt;
              &lt;ion-item  [hidden]="newPassword.valid || (newPassword.pristine &amp;&amp; !f.submitted)" class="validation_error"&gt;
                  &lt;ion-label class="text-danger"&gt;
                      New Password is required
                  &lt;/ion-label&gt;
              &lt;/ion-item&gt;
          &lt;ion-item&gt;
              &lt;ion-input type="password" name="confirmPassword" placeholder="Confrim Password" [(ngModel)]="user.confirmPassword" required validateEqual="newPassword" reverse="false" #confirmPassword="ngModel"&gt;&lt;/ion-input&gt;
          &lt;/ion-item&gt;
          &lt;ion-item [hidden]="confirmPassword.valid || (confirmPassword.pristine &amp;&amp; !f.submitted)" class="validation_error"&gt;
              &lt;ion-label class="text-danger"&gt;
                  Password mismatch
              &lt;/ion-label&gt;
          &lt;/ion-item&gt;
          &lt;div class="space_lr"&gt;
              &lt;button block ion-button&gt;Done&lt;/button&gt;  
          &lt;/div&gt;
          &lt;!-- /.space_lr --&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and I need to get the value of current password and new password.</p>
  
  <p>The method I am trying is returning a blank with no error, and I am very much curious. </p>
  
  <p>i have a function called </p>
  
  <pre><code>   account = {
       currentPassword: '',
       newPassword: '',
     };
  
   changePassword() {
  
    let loading = this.loadingCtrl.create({
      content: 'Please wait...'
    });
  
    let callParams = {
      lmId: this.lmService.getSession('memberId'),
      currentPassword: this.account.currentPassword,
      newPassword: this.account.newPassword
    }
    console.log(this.account.newPassword) // returns blank
    .........
  </code></pre>
  
  <p>Any idea what I am doing wrong ?</p>