title: Angular 2 `this` reference in promise
body: <p>My service has the following code:</p>
  
  <pre><code>....
  isAuthenticated(){
        var tt = this;
        if(tt.current_user){
            return Promise.resolve(tt.current_user,false);
        }else{
            return new Promise(resolve =&gt; {
                this.http.get(this.api.urlBase+this.api.apiBase+'/Individuals/me',
                             {withCredentials: true})
                .map(res=&gt;res.json())
                .subscribe((data) =&gt; {
                    tt.current_user = data;
                    resolve(data,false);
                },(err)=&gt;{
                    reject(err,true);
                });
            })
        }
    }
  ....
  </code></pre>
  
  <p>And in my page class, I am trying to access it as:</p>
  
  <pre><code>constructor(){
  ...
  let tt = this;
  individual.isAuthenticated().then(this.handleLogin);
  ...
  }
  ...
  handleLogin(d,err){
          console.log("This: ",this);
          console.log("This: ",tt);
          this.nav.present(this.loading);
      }
  </code></pre>
  
  <p>but in <code>handleLogin</code>, <code>this.nav</code> throws an error that <code>this</code> is undefined, and the console logs show <code>this</code> as blank and <code>tt</code> as undefined. How do I reference <code>this</code> from within that function? </p>