framework icon indicating copy to clipboard operation
framework copied to clipboard

click.delegate doesn't work with repeat.for

Open alexmahterian opened this issue 10 years ago • 3 comments

I've got a list of items being pulled from my server that populates a list element. I need to be able to click on those items to add them to an array, but click.delegate doesn't work, nor does $parent.click.delegate. I've also tried to use JQuery via $("#myelement li).click(...) and [...].on('click', funciton(...)); none of these seem to work. Do you have any suggestions as to how I can get around this?

alexmahterian avatar Mar 01 '16 16:03 alexmahterian

@alexmahterian,

nor does $parent.click.delegate

$parent is supposed to be used in the attribute value, smth like click.delegate="$parent.save()"

atsu85 avatar Mar 01 '16 20:03 atsu85

I don't know why I was trying to do that, but I was indeed trying to use $parent.click.delegate. Thanks for pointing that out, applying it to the function worked fine!

alexmahterian avatar Mar 01 '16 20:03 alexmahterian

I'm glad it got solved - Please close the issue :)

atsu85 avatar Mar 01 '16 20:03 atsu85