Permalink
Browse files

feat(actions): define action buttons in schema

Still needs some documentation on how to use
  • Loading branch information...
bas080
bas080 committed May 24, 2016
1 parent 69abddb commit f205d9c3cf321e01568a5335e42fa6ef25b91a08
@@ -0,0 +1,10 @@
<template>

<button
class="btn"
repeat.for="action of attribute.actions"
click.delegate="onClick(action)">
${action.label}
</button>

</template>
@@ -0,0 +1,18 @@
//import {bindable, bindingMode} from 'aurelia-framework';

export class ActionsCustomComponent {

constructor() {
console.log('actions');
}

activate(model) {
this.attribute = model.attribute;
this.model = model.model;
}

onClick(action) {
action.action(this.model);
}

}
@@ -1,4 +1,5 @@
export default {
actions: 'actions',
fieldset: 'fieldset.html',
button: 'input.html',
checkbox: 'checkbox.html',

0 comments on commit f205d9c

Please sign in to comment.