title: Angular 2: Best way to declare and initialize variables
body: <p>I am studing Angular Style Guide, but I have a doubt, what's the best way to initialize a variable in component?</p>
  
  <p>For example, I declare a variable like this:</p>
  
  <pre><code>export class MyComponent implements OnInit {
  
    myModel: MyModel= new MyModel();
  
    //...
  }
  </code></pre>
  
  <p>Or like this:</p>
  
  <pre><code>export class MyComponent implements OnInit {
  
    myModel = new MyModel();
  
    //...
  }
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>export class MyComponent implements OnInit {
  
    myModel: MyModel;
  
    constructor() {
      this.myModel = new MyModel();
    }
  
    //...
  }
  </code></pre>
  
  <p>Or another best way?
  Here's the <a href="https://angular.io/guide/styleguide" rel="nofollow noreferrer">Style Guide</a> I was reading.</p>