I need to activate multiple function (or rather, expression) when a click event occure.
I know I can move all of my logic into a wrapper function and call that from the delegate,
but in my case it would be very helpful if I could call multiple handlers from the view directly.
I’ve seen this question asked a lot of time in SO.
with no real good answers.
a colleague suggested I try the following: and to my surprise - it worked.
<button click.delegate="[click1(), click2()]">multiple click handlers</button>
but I couldn’t find any reference in the docs, or in any of the SO questions below.
so I wanted to know, if its “legit”.
when did it became available?
I think this syntax is weird. I would preferred <button click.delegate="click1(); click2();">multiple click handlers</button>
what is the direction of Aurelia2 in that context?