Skip to content

Instantly share code, notes, and snippets.

@hfitzwater
Forked from JoshMcCullough/app.html
Last active February 7, 2017 19:30
Show Gist options
  • Save hfitzwater/8bf0404244d23843e010c943cbdfceab to your computer and use it in GitHub Desktop.
Save hfitzwater/8bf0404244d23843e010c943cbdfceab to your computer and use it in GitHub Desktop.
Slotz
<template>
<require from="./component.html"></require>
<component>
<div slot="slot1">SLOT 1 OVERRIDE</div>
</component>
</template>
export class App { }
<template>
<h1>COMPONENT</h1>
<div>
<slot name="slot1">SLOT 1 DEFAULT</slot>
</div>
<div>
<slot name="slot2">SLOT 2 DEFAULT</slot>
</div>
</template>
<!doctype html>
<html>
<head>
<title>Slotz</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app="main">
<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>
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-validation');
aurelia.start().then(() => aurelia.setRoot());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment