title: Aurelia transpiler: "this" is "null"
body: <p>I have the following code in my Aurelia app:</p>
  
  <pre><code>import {digit} from "../util/random" // generates a random digit [0,9]
  
  export class UnitedStates {
  
    zipCode() {
      return ""+digit(5);
    };
  
    zipPlus4() {
      return this.zipCode()+"-"+digit(4);
    };
  
    ...
  
  }
  </code></pre>
  
  <p>Getting the error <code>TypeError: Cannot read property 'zipCode' of null</code> on the body of <code>zipPlus4</code>. Inspection in the developer tool reveals that <code>this</code> is <code>null</code>.</p>
  
  <p>Why is <code>this</code> <code>null</code>, and how do I fix this?</p>