Created
March 24, 2019 11:10
-
-
Save olukashov/ffb843b5b4d8713e4647824b082b0d22 to your computer and use it in GitHub Desktop.
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> | |
| <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <div aurelia-app="src/configure"> | |
| Loading... | |
| </div> | |
| <script src="https://rawgit.com/aurelia-ui-toolkits/demo-materialize/gh-pages/jspm_packages/system.js"></script> | |
| <script src="https://rawgit.com/aurelia-ui-toolkits/demo-materialize/gh-pages/jspm.config.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
| <template> | |
| <div> | |
| <div style="margin-top: 10px;"> | |
| Default: | |
| <md-switch checked.bind="checked"></md-switch> | |
| With value: ${checked | stringify} | |
| </div> | |
| <div style="margin-top: 10px;"> | |
| Custom labels: | |
| <md-switch label-on="enabled" label-off="disabled" checked.bind="checked"></md-switch> | |
| With value: ${checked | stringify} | |
| </div> | |
| <div style="margin-top: 10px;"> | |
| Disabled: | |
| <md-switch disabled.bind="disabled"></md-switch> | |
| </div> | |
| <div style="margin-top: 10px;"> | |
| <button md-button="flat: true;" click.delegate="toggleDisabled()">toggle disabled</button> | |
| </div> | |
| </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 { | |
| checked = true; | |
| disabled = true; | |
| toggleDisabled() { | |
| this.disabled = !this.disabled; | |
| } | |
| } | |
| // tslint:disable-next-line:max-classes-per-file | |
| export class StringifyValueConverter { | |
| toView(value) { | |
| return JSON.stringify(value); | |
| } | |
| } |
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 async function configure(aurelia) { | |
| await aurelia.loader.loadModule("materialize-css"); | |
| aurelia.use | |
| .standardConfiguration() | |
| .developmentLogging() | |
| .plugin("aurelia-materialize-bridge", bridge => bridge.useAll()) | |
| .plugin("aurelia-validation") | |
| .globalResources("src/shared/logger"); | |
| await aurelia.start(); | |
| aurelia.setRoot("src/app"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment