Last active
October 5, 2016 09:03
-
-
Save martonsagi/f0698d5b0066c3674c29c40d850217dc to your computer and use it in GitHub Desktop.
Aurelia HTML only element default values
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="./cust-elem.html"></require> | |
<cust-elem param1.bind="value1" param2.bind="value2"></cust-elem> | |
</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
export class App { | |
value2 = 'default 2'; | |
attached() { | |
setTimeout(() => { | |
this.value1 = 'new value 1' | |
}, 2000); | |
setTimeout(() => { | |
this.value2 = 'new value 2' | |
}, 1000); | |
} | |
} |
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 bindable="param1,param2,param3"> | |
<ul> | |
<li>Param1 value: '${param1 || 'default 1'}'</li> | |
<li>Param2 value: '${param2}'</li> | |
<li>Param3 value: '${param3 || 'default 3'}'</li> | |
</ul> | |
</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
<!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://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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment