title: Access private members of class from callback of a function
body: <p>This is my code</p>
  
  <pre><code>class MyClass {
    private ref: any;
    private ourprogress: any = 0;
    onUploadAll() {
      ref.api(somedata).then(function (snapshot) {
           this.ourprogress++;//Not working
      });
    }
  }
  </code></pre>
  
  <p>ourprogress remains unchanged no matter what</p>