Skip to content

Instantly share code, notes, and snippets.

@raymak23
Created July 14, 2018 22:13
Show Gist options
  • Save raymak23/3b363a9845a85dbedabd367bf6b403df to your computer and use it in GitHub Desktop.
Save raymak23/3b363a9845a85dbedabd367bf6b403df 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>
It's on the right edge. Make sure, your viewport is big enough.
</div>
<div>
<button md-button="flat: true;" md-waves="color: primary;" click.delegate="toggleSideNav()">toggle</button>
</div>
<md-sidenav view-model.ref="sideNav" fixed.bind="show" edge="right">
<!-- edge="right" -->
<ul>
<li md-waves><a>About</a></li>
<li md-waves><a>Installation</a></li>
<li md-waves><a>Project Status</a></li>
<li md-waves><a>Help/Docs</a></li>
</ul>
</md-sidenav>
</template>
export class App {
show = true;
toggleSideNav() {
this.show = !this.show;
}
}
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