Skip to content

Instantly share code, notes, and snippets.

@opcodewriter
Last active March 11, 2016 08:37
Show Gist options
  • Save opcodewriter/cbce008ca4e1456a8151 to your computer and use it in GitHub Desktop.
Save opcodewriter/cbce008ca4e1456a8151 to your computer and use it in GitHub Desktop.
Aurelia Binding Bug
<template>
<a href="#!" click.delegate="selectUser(user.id)" class="collection-item ${user.state}" repeat.for="user of users" id="user-${user.id}">
<span if.bind="!user.lastName">${user}</span>
<span if.bind="user.firstName">${user.lastName}, ${user.firstName}</span>
</a>
</template>
export class App {
users = [
{ id: 1, firstName: 'Rob', lastName: 'Eisenberg' },
{ id: 2, firstName: 'Jeremy', lastName: 'Danyow' },
{ id: 3, firstName: 'Matt', lastName: 'Broadst' }];
.
}
<!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