Skip to content

Instantly share code, notes, and snippets.

@charlespockert
Forked from haiau79/app.html
Last active May 17, 2016 17:54
Show Gist options
  • Save charlespockert/675bae337515fd2ec7c26150296d4253 to your computer and use it in GitHub Desktop.
Save charlespockert/675bae337515fd2ec7c26150296d4253 to your computer and use it in GitHub Desktop.
<template>
<form role="form">
<div data-toggle="buttons">
<label repeat.for="option of someOptions" class="btn btn-primary">
<input type="checkbox" model.bind="option.value" checked.two-way="selectedOptions">${option.name}
</label>
</div>
</form>
Selected:
<ul>
<li repeat.for="option of selectedOptions">
${option}
</li>
</ul>
</template>
export class App {
selectedOptions = [];
someOptions = [
{value: 1, name: 'Test 1'},
{value: 2, name: 'Test 2'},
{value: 3, name: 'Test 3'}
];
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></link>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script>
<script src="https://cdn.rawgit.com/valichek/aurelia-bundle/i18n-0.5.2v0.0.4/config.js"></script>
</head>
<body aurelia-app="main">
<h1>Loading...</h1>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging();
aurelia.start().then(() => aurelia.setRoot());
}
/* todo: add styles */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment