Created
March 13, 2018 02:27
-
-
Save thinkOfaNumber/559df60c2bc87cf9cf336b00cbb28d9a to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<require from='input-checkbox'></require> | |
<h1>Testing custom checkboxes</h1> | |
<input-checkbox label="First checkbox" my-id="first" checked.bind="first"></input-checkbox> | |
<input-checkbox label="Second checkbox" my-id="second" checked.bind="second"></input-checkbox> | |
<div> | |
<p>Debug</p> | |
<p>First checkbox: ${first}</p> | |
<p>Second checkbox: ${second}</p> | |
</div> | |
</template> |
This file contains hidden or 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
export class App { | |
first = false; | |
second = false; | |
} |
This file contains hidden or 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"> | |
<style> | |
.panel { | |
border: 1px solid black; | |
} | |
.panel-heading { | |
background: lightblue; | |
color: white; | |
border-bottom: 1px solid black; | |
padding: 3px; | |
font-size: 20px; | |
} | |
.panel-body { | |
padding: 3px; | |
} | |
</style> | |
</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> |
This file contains hidden or 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> | |
<div class="form-check"> | |
<input type="checkbox" id.bind="myId" checked.bind="checked" class="form-check-input"> | |
<label style="color: blue" class="form-check-label" for.bind="myId">${label}</label> | |
<span style="color:red">(my ID should be "${myId}")</span> | |
</div> | |
</template> |
This file contains hidden or 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 { bindable, bindingMode } from 'aurelia-framework'; | |
export class InputCheckbox { | |
@bindable myId; | |
@bindable label; | |
@bindable({ defaultBindingMode: bindingMode.twoWay }) checked; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment