title: Assign value to property in the field but not in constructor in typescript
body: <p>It is working  if I  assign value to property in the field, but not in the constructor in typescript, as <code>proda = this.navParams.data;</code> in the field. I try this and it seems to be working in my ionic page .ts file.</p>
  
  <p>It is the correct original code below:</p>
  
  <pre><code> import { Component } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  
  /**
   * Generated class for the BuyoutPage page.
   *
   * See https://ionicframework.com/docs/components/#navigation for more info on
   * Ionic pages and navigation.
   */
  
  @IonicPage()
  @Component({
    selector: 'page-buyout',
    templateUrl: 'buyout.html',
  })
  export class BuyoutPage {
  
    proda;    
  
    constructor(public navCtrl: NavController, public navParams: NavParams) {
      this.proda = this.navParams.data;
    }
  
    ionViewDidLoad() {
      console.log('ionViewDidLoad BuyoutPage');
    }
  
    onConfirm(){
      this.navCtrl.popToRoot();
    }
  
  }
  </code></pre>
  
  <p>It is the code that I tried to assign value to the field but not in constructor, and seems to work: </p>
  
  <pre><code> import { Component } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  
  /**
   * Generated class for the BuyoutPage page.
   *
   * See https://ionicframework.com/docs/components/#navigation for more info on
   * Ionic pages and navigation.
   */
  
  @IonicPage()
  @Component({
    selector: 'page-buyout',
    templateUrl: 'buyout.html',
  })
  export class BuyoutPage {
  
    proda = this.navParams.data;  
  
    constructor(public navCtrl: NavController, public navParams: NavParams) {
  
    }
  
    ionViewDidLoad() {
      console.log('ionViewDidLoad BuyoutPage');
    }
  
    onConfirm(){
      this.navCtrl.popToRoot();
    }
  
  }
  </code></pre>