In my angular project, I have the following:
main.html:
<my_project [Number]="ID"></my_project>
my_project.ts:
export class my_project {
@Input() Number: Array<any>;
...
my_function(id){
console.log("ID number: " + id);
};
}
I know how to pass data to another directive. I was wondering if there is a way to call a function directly from "main.html" or "main.ts" like below:
<my_project [my_function]></my_project>
Any help will be much appreciated.
Thanks!