title: Unable to catch events from EventEmitter in Angular2?
body: <p>I have written a basic angular application that utilises the EventEmitter class, however i cannot get the listening component to catch the event.</p>
  
  <p>Here is my code (using alpha.27 on Angular2 / TypeScript 1.5 compiling to ES5)
  Apologises for the verbose example.</p>
  
  <p>Any advice on what i am incorrectly doing what would be greatly appreciated.</p>
  
  <pre><code>import {Component, View, EventEmitter} from 'angular2/angular2';
  
  @Component({
      selector: 'login',
      events : ['loggedIn']
  })
  
  @View({
      template: '&lt;button type="button" (click)="submitForm()"&gt;Click Me&lt;/button&gt;'
  })
  
  export class Login {
  
      loggedIn = new EventEmitter();
  
      constructor() { 
      }
  
      submitForm() {
          console.log("event fired");
          this.loggedIn.next({});
      }
  
  }
  
  
  @Component({
      selector: 'app'
  })
  
  @View({
      template: "&lt;div&gt;This is the application&lt;/div&gt;"
  })
  
  export class App {
      constructor() {
  
      }
  }
  
  @Component({
    selector: 'root'
  })
  
  @View({
    template: '&lt;app [hidden]=!showApp&gt;&lt;/app&gt;&lt;login (loggedIn)="loggedIn()" [hidden]=showApp&gt;&lt;/login&gt;',
    directives: [ App, Login ]
  })
  
  export class Root {
  
      showApp:boolean;
  
      constructor() { 
          this.showApp = false; 
      }
  
      loggedIn() { 
          console.log("event caught");
          this.showApp = true; 
      }
  
  }
  </code></pre>