title: Passing @Input and subscribing to @Output while navigating to a Route in Angular 2 Component
body: <p>When we navigate to a route and load components,</p>
  
  <ol>
  <li>Can we pass variable decorated with <code>@Input</code> in loaded child component and can we subscribe to <code>EventEmitter</code> decorated with <code>@Output</code> ?</li>
  <li>Is there any <code>lifecycle Hook</code> available in parent, where Route is defined and we may get a reference to loaded component, so as to pass values\subscribe functions to child component dynamically?</li>
  </ol>
  
  <p><strong>Parent Component</strong></p>
  
  <pre><code>   @Component({
      moduleId: module.id,
      selector: "parent",
      templateUrl: "&lt;router-outlet&gt;&lt;/router-outlet&gt;"
    })
    @Routes([
     { path: "/child-component1", component: Child1Component }
    ])
    export class Parent {
     // Can we pass var1 and subscribe close here of Child1Component when route is navigated dynamically based upon path?
     // Is there any lifecycleHook available in parent where Route is defined?
    }
  </code></pre>
  
  <p><strong>Child Component</strong></p>
  
  <pre><code>  @Component({
      moduleId: module.id,
      selector: "child-component1",
      template: "&lt;div&gt;{{var1}}&lt;/div&gt;&lt;button (click)='closeMenu()'&gt;Close&lt;/button&gt;"
    })
    export class Child1Component {
     @Input() var1: string;
     @Output() close: EventEmitter&lt;any&gt; = new EventEmitter&lt;any&gt;();
  
     constructor() { }
  
     closeMenu = (): void =&gt; {
        this.close.emit("");
     }
   }
  </code></pre>
  
  <p>I am using <code>Angular2 RC1</code></p>
  
  <p>Thanks in advance!</p>