Last active
August 9, 2016 15:29
-
-
Save fabioluz/88500143701dab0b0697b17a211af3a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
${message} | |
<hr> | |
Example 1 | |
<div click.delegate="update()"> | |
<div class="checkbox"> | |
<label> | |
<input checked.bind="isChecked" type="checkbox"> Visibility | |
</label> | |
</div> | |
</div> | |
<br><br> | |
Example 2 | |
<div click.delegate="update2()"> | |
<div class="checkbox"> | |
<label> | |
<input checked.bind="isChecked2" type="checkbox"> Visibility | |
</label> | |
</div> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {BindingSignaler} from 'aurelia-templating-resources'; | |
import { TaskQueue } from 'aurelia-task-queue'; | |
export class App { | |
message = 'Hello World!'; | |
static inject() { return [BindingSignaler, TaskQueue]; } | |
constructor(signaler, taskQueue) { | |
this.signaler = signaler; | |
this.taskQueue = taskQueue; | |
} | |
isChecked = false; | |
isChecked2 = false; | |
update(){ | |
this.taskQueue.queueTask(() => { | |
alert(this.isChecked); | |
}); | |
return true; | |
} | |
update2(){ | |
alert(this.isChecked2); | |
return true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body aurelia-app> | |
<h1>Loading...</h1> | |
<script src="https://jdanyow.github.io/rjs-bundle/node_modules/requirejs/require.js"></script> | |
<script src="https://jdanyow.github.io/rjs-bundle/config.js"></script> | |
<script src="https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js"></script> | |
<script src="https://jdanyow.github.io/rjs-bundle/bundles/babel.js"></script> | |
<script> | |
require(['aurelia-bootstrapper']); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment