Use the call bind command to give a link to a function call to your user element:
<custom-element on-completed.call="updateDescription()"></custom-element>
To call the updateDescription method with arguments, you can do the following:
export class CustomElem { @bindable onCompleted; ... fooBarBaz() { var args = { something: 'A', somethingElse: 'B', anotherArg: 'C' }; this.onCompleted(args); } }
<custom-element on-completed.call="updateDescription(something, somethingElse, anotherArg)"></custom-element>
Jeremy danyow
source share