title: Why does private field have a value of “undefined” inside private method of it's own component in TypeScript?
body: <p>I'm developing an authorization component for my <strong>angular2</strong> app:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { IAuthData } from './auth-data';
  import { IAuthResult } from './auth-result';
  import { AuthorizationService } from './authorization.service';
  import { NotificationsService } from 'angular2-notifications';
  
  @Component({
      templateUrl: 'authorization.component.html',
      styleUrls: [ 'authorization.component.css' ],
      moduleId: module.id
  })
  export class AuthorizationComponent implements OnInit {
      private _authorizationService: AuthorizationService;
      private _notificationsService: NotificationsService;
  
      constructor(private authorizationService: AuthorizationService, private notificationsService: NotificationsService) {
          this._authorizationService = authorizationService;
          this._notificationsService = notificationsService;
      }
  
      public pageTitle: string = 'AUTHORIZATION';
      public login: string;
      public password: string;
  
      ngOnInit() : void {
  
      }
  
      authorize(): void {
          this._notificationsService.info(this.pageTitle, `Authorization attempt for "${this.login}": sending auth query to the server.`);
          this._authorizationService.authorize(&lt;IAuthData&gt;{ login: this.login, hash: this.password })
              .subscribe(authResult =&gt; {
                  let message: string = `"${this.login}": ${authResult.message}`;
                  if (authResult.isAuthorized) {
                      this._notificationsService.info(this.pageTitle, message);
                  }
                  else {
                      this._notificationsService.error(this.pageTitle, message);
                  }
              });
      }
  }
  </code></pre>
  
  <p>This code works fine, but, in refactoring purposes, I've decided to move lambda expression code from <code>subscribe</code> into separate method:</p>
  
  <pre><code>private processAuthResult(authResult: IAuthData): void {
       let message: string = `"${this.login}": ${authResult.message}`;
                      if (authResult.isAuthorized) {
                          this._notificationsService.info(this.pageTitle, message);
                      }
                      else {
                          this._notificationsService.error(this.pageTitle, message);
                      }let message: string = `"${this.login}": ${authResult.message}`;
                      if (authResult.isAuthorized) {
                          this._notificationsService.info(this.pageTitle, message);
                      }
                      else {
                          this._notificationsService.error(this.pageTitle, message);
                      }
  }
  </code></pre>
  
  <p>Since I did it, field <code>this._notificationsService</code> has a value of <code>undefined</code> inside <code>pocessAuthResult()</code> method. I use this method like this:</p>
  
  <pre><code>authorize(): void {
              this._notificationsService.info(this.pageTitle, `Authorization attempt for "${this.login}": sending auth query to the server.`);
              this._authorizationService.authorize(&lt;IAuthData&gt;{ login: this.login, hash: this.password })
                  .subscribe(this.processAuthResult);
          }
  </code></pre>
  
  <p>What's the reason?</p>