Created
May 10, 2017 09:19
-
-
Save Thanood/eebb65ea62b76027b40468a2b59d5b68 to your computer and use it in GitHub Desktop.
Aurelia-Materialize bridge radio buttons basic use html labels
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> | |
<div> | |
<p> | |
<md-radio md-name="myOption" md-value="option1" md-checked.bind="choice">My <strong>awesome</strong> Option 1</md-radio> | |
<md-radio md-name="myOption" md-value="option2" md-checked.bind="choice">Option 2</md-radio> | |
<md-radio md-name="myOption" md-value="option3" md-checked.bind="choice">Option 3</md-radio> | |
</p> | |
<p> | |
Your choice: ${choice} | |
</p> | |
</div> | |
<div style="margin-top: 15px;"> | |
<p style="font-weight: bold;">with gap</p> | |
<p> | |
<md-radio md-gap="true" md-name="myGapOption" md-value="option1" md-checked.bind="gapChoice">Option 1</md-radio> | |
<md-radio md-gap="true" md-name="myGapOption" md-value="option2" md-checked.bind="gapChoice">Option 2</md-radio> | |
<md-radio md-gap="true" md-name="myGapOption" md-value="option3" md-checked.bind="gapChoice">Option 3</md-radio> | |
</p> | |
<p> | |
Your choice: ${gapChoice} | |
</p> | |
<p> | |
<a md-button="flat: true;" md-waves class="accent-text" click.delegate="selectOption1()">select option 1</a> | |
</p> | |
</div> | |
</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 { | |
choice = 'option2'; | |
gapChoice = 'option3'; | |
selectOption1() { | |
this.choice = 'option1'; | |
this.gapChoice = 'option1'; | |
} | |
} |
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> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-materialize-bundles/0.20.2/config2.js"></script> | |
<script> | |
System.import('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
/******************************************************************************* | |
* The following two lines enable async/await without using babel's | |
* "runtime" transformer. Uncomment the lines if you intend to use async/await. | |
* | |
* More info here: https://github.com/jdanyow/aurelia-plunker/issues/2 | |
*/ | |
//import regeneratorRuntime from 'babel-runtime/regenerator'; | |
//window.regeneratorRuntime = regeneratorRuntime; | |
/******************************************************************************/ | |
import 'materialize'; | |
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-materialize-bridge', bridge => bridge.useAll() ); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment