Skip to content

Instantly share code, notes, and snippets.

@diegogarcia28
Last active December 2, 2016 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save diegogarcia28/549282ece087785a3b7f6eb9c9d6a6d4 to your computer and use it in GitHub Desktop.
Save diegogarcia28/549282ece087785a3b7f6eb9c9d6a6d4 to your computer and use it in GitHub Desktop.
<template>
<input type="text" list="myDatalist" value.bind="selectedValue" />
<datalist id="myDatalist">
<option repeat.for="option of options" model.bind="option">${option.name}</option>
</datalist>
<pre><code>${selectedValue}</code></pre>
</template>
export class App {
options = [ { id: 1, name: 'one' }, { id: 2, name: 'two' } ];
}
<!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://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