Skip to content

Instantly share code, notes, and snippets.

@AshleyGrant
Created July 19, 2016 19:06
Show Gist options
  • Save AshleyGrant/1d91fc2ad07ab63fe69a42a0017bdafd to your computer and use it in GitHub Desktop.
Save AshleyGrant/1d91fc2ad07ab63fe69a42a0017bdafd to your computer and use it in GitHub Desktop.
Aurelia bug with checked.bind
<template>
<ul>
<li repeat.for="item of items">
<input
type="radio"
name="item"
value.bind="item"
checked.bind="selected">
${selected == item}
</li>
</ul>
${selected}
</template>
export class App {
items = ['a', 'b', 'c'];
selected = 'b'
select(item) {
this.selected = item;
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
</head>
<body aurelia-app>
<h1>Loading...</h1>
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/jspm_packages/system.js"></script>
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/config.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment