Skip to content

Instantly share code, notes, and snippets.

@jrgcubano
Created October 24, 2018 15:46
Show Gist options
  • Save jrgcubano/e56090951b1052f7c632e6a40d049a2c to your computer and use it in GitHub Desktop.
Save jrgcubano/e56090951b1052f7c632e6a40d049a2c to your computer and use it in GitHub Desktop.
<!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>
<template>
<div>
<md-progress value.bind="value"></md-progress>
</div>
<div>
<md-input label="value" value.bind="value" view-model.ref="inputValue"></md-input>
</div>
<div>
<button md-button="flat: true;" md-waves class="accent-text" click.delegate="setNull()">set value = null (indeterminate)</button>
</div>
</template>
import { MdInput } from "aurelia-materialize-bridge";
export class App {
inputValue: MdInput;
value = 15;
setNull() {
this.inputValue.value = null;
}
}
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