Your code only binds a string nameOfFuncFromAnotherComponentto an attribute callback(and a property, if one exists). Angular does not interpret the meaning at all.
To make Angular binding management
<awesome [callback]="nameOfFuncFromAnotherComponent"></awesome>
Angular is also evaluated in this syntax.
<awesome callback="{{nameOfFuncFromAnotherComponent}}"></awesome>
but converts the result to a string (calls .toString()) before assignment.
Thanks @MarkRajcok for clarification :)
source
share