title: Angular2 passing a function to a directive via attribute
body: <p>I'm trying to bind a function in a parent component into a property on a child component.</p>
  
  <p>This is what I have</p>
  
  <pre><code>@Component({
    selector: 'awesome',
    templateUrl: 'awesome.html'
  })
  export class AwesomeComponent {
  
  @Input() callback: Function;
  
  ngOnInit() {
  
      this.callback();//Error, this.callback is not a function,  but contains a string value on the fuction call
      }
  }
  </code></pre>
  
  <p>This is how i'm using it</p>
  
  <pre><code>&lt;awesome callback="nameOfFuncFromAnotherComponent"&gt;&lt;/awesome&gt;
  </code></pre>
  
  <p>but it doesn't seem to work</p>