Closed wshayes closed 8 years ago
an example is a must have in the book.
my-view.js defines a create
export class MyView
{
@bindable create;
}
my-view.html calls create()
<template>
<button type="button" click.delegate="create()">Create</button>
</template>
app.html passes create_now
to my-view
:
<template>
<my-view create.call="create_now()"></my-view>
</template>
app.js
export class MyView
{
create_now()
{
}
}
I should had created a gist :)
I absolutely agree guys, I will definitely add in some clarification for this in the next release.
Ahh! Thanks @opcodewriter - that is very clear now.
On Mar 30, 2016, at 2:37 AM, Dwayne Charrington notifications@github.com wrote:
I've made your above provided example @opcodewriter https://github.com/opcodewriter into a Gist accessible here https://gist.github.com/Vheissu/9b49c26623f4dc6e63a0347ca48af6b3 and a Gist.run example here https://gist.run/?id=9b49c26623f4dc6e63a0347ca48af6b3.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/Vheissu/aurelia-for-real-world-web-applications-book-feedback/issues/43#issuecomment-203275657
I still don't understand what the .call binding does and the example further down didn't clear it up. Could you elaborate more on this?