Skip to content

Instantly share code, notes, and snippets.

@patrek
Last active February 18, 2016 20:57
Show Gist options
  • Save patrek/f364385358c27699004d to your computer and use it in GitHub Desktop.
Save patrek/f364385358c27699004d to your computer and use it in GitHub Desktop.

I have a custom component where I do:

  <template>
    <div repeat.for="element of elements">
        <div click.delegate="edit(element)">${element.name}</div>
    </div>
  </template>

This is called from another template

<template>
  <require from="./element-list"></require>
  
  <element-list elements.bind="items"></element-list>
</template>

How can I hook things together so that when I click on an item, the action is sent back to my "main" model? Something like:

<element-list elements.bind="items" something.something="nameOfCallback"></element-list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment