title: Angular2 - a Issue about function scope
body: <p>I'm having a trouble when I making my Angular2 Sample with http module,
  I basically have this (short-sample) component:</p>
  
  <pre><code>app.loginComponent =
      ng.core.Component({
          selector: 'login',
          templateUrl: 'app/login/login.html',
          providers:[lazyResolveService(['app.loginService'])]
      }).Class({
          constructor: [
              ng.http.Http,
              lazyResolveService(['app.loginService']),
              function (http,service) {
                  this.result = 'hello world';
                  this.httpService = http;
                  this.loginService = service;
                  // this.loginService = app.loginServiceInjector.get(app.loginService);
              }
          ],
  
          login: function (username) {
              //this.loginService.printName(username);
              this.httpService.get('http://localhost:8080/xxx/login')
                      .map(function (res) {
                           var str2 = JSON.parse(res._body);
                           return str2.message.securityMessage;
                      })
                      .subscribe(function (res) {
                          console.log(res);
                          console.log(this.result);
                          return this.result = res;
                      });
              console.log(this.result);
          }
      });
  </code></pre>
  
  <p>So, that is just a snippet of my component. And I'm having trouble accessing the local variables from within my login function.
  As see, when the code running following function:</p>
  
  <pre><code>                 subscribe(function (res) {
                          console.log(this.result);
                          return this.result = res;
                      })
  </code></pre>
  
  <p>it got a result：'undefine',so that means 'this.result' is undefine, and the scope of 'this.result' is not in the loginComponent's constructor function.
  so how can I access local variable in that case?</p>