Last active
August 1, 2018 12:18
-
-
Save timfish/47988738fab2a2756e1396774033df2c to your computer and use it in GitHub Desktop.
remove svg wrappers
This file contains 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> | |
<require from="./select-component"></require> | |
<select-component selected.bind="selected"></select-component> | |
<div> | |
Selected: ${selected.name} | |
</div> | |
</template> |
This file contains 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
import { viewEngineHooks } from 'aurelia-framework' | |
export class App { | |
selected; | |
} |
This file contains 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
<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://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 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> | |
<button repeat.for="each of options" | |
click.delegate="select(each)" | |
css="margin:5px; border: 3px solid ${selected === each ?'blue':'transparent'}"> | |
${each.name} | |
</button> | |
</template> |
This file contains 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
import {containerless, bindable, customElement, bindingMode } from 'aurelia-framework' | |
// @containerless | |
@customElement('select-component') | |
export class SelectComponent { | |
options = [ | |
{name:'One'}, | |
{name:'Two'}, | |
{name:'Three'}, | |
{name:'Four'}, | |
{name:'Five'}, | |
]; | |
@bindable({ | |
defaultBindingMode: bindingMode.twoWay | |
}) selected; | |
select(selected){ | |
this.selected = selected; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment