title: Can't use var or let outside function in Angular CLI
body: <p>In my Angular CLI components, I get an error when defining a variable as a 'var' or 'let' outside of a function. I also get an error using the keyword 'function'. If I declare just by name it's fine. For instance in this stripped down component:</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
    selector: 'home',
    templateUrl: 'home.component.html',
    styleUrls: ['home.component.scss']
  })
  export class HomeComponent {
    constructor() {}
  
    var aaa = '1';       // nope
    let bbb = '2';       // nope
    ccc = '3';           // ok
  
    method1(){           // ok
      let ddd = '4';     // ok
    }
  
    function method2(){  // nope
  
    }
  
  }
  </code></pre>
  
  <p>For aaa, bbb, and method2 it is throwing the error: "[ts] Unexpected token. A constructor, method, accessor, or property was expected." </p>
  
  <p>What am I doing wrong here? I suspect it is a configuration problem with my project?</p>