Last active
May 29, 2018 04:33
-
-
Save 3cp/cfaa060c8bbd776e9595b13a4d33d1bf to your computer and use it in GitHub Desktop.
select init
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> | |
<p>select with repeat.for options. foo = ${foo}</p> | |
<select value.bind="foo"> | |
<option repeat.for="opt of ['one', 'two']" model.bind="opt">${opt}</option> | |
</select> | |
<p>select with one option + repeat.for options. foo2 = ${foo2}</p> | |
<select value.bind="foo2"> | |
<option value="one">one</option> | |
<option repeat.for="opt of ['two']" model.bind="opt">${opt}</option> | |
</select> | |
<p>select with one disabled option + repeat.for options. foo3 = ${foo3}</p> | |
<select value.bind="foo3"> | |
<option value="one" disabled="disabled">one</option> | |
<option repeat.for="opt of ['two']" model.bind="opt">${opt}</option> | |
</select> | |
<p>select with hard coded options. bar = ${bar}</p> | |
<select value.bind="bar"> | |
<option model="one">one</option> | |
<option model="two">two</option> | |
</select> | |
<p>select with hard coded options (case 2). bar2 = ${bar2}</p> | |
<select value.bind="bar2"> | |
<option value="one">one</option> | |
<option value="two">two</option> | |
</select> | |
</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 { | |
foo; | |
foo2; | |
foo3; | |
bar; | |
bar2; | |
} |
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"> | |
</head> | |
<body aurelia-app="main"> | |
<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
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging('warn'); | |
aurelia.start().then(() => aurelia.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment