Skip to content

Instantly share code, notes, and snippets.

@fabioluz
Created August 9, 2016 20:33
Show Gist options
  • Save fabioluz/a75d76272316ca25513802bda8d225d1 to your computer and use it in GitHub Desktop.
Save fabioluz/a75d76272316ca25513802bda8d225d1 to your computer and use it in GitHub Desktop.
<template>
<router-view layout-view="default.html"></router-view>
</template>
export class App {
configureRouter(config, router){
config.map([
{ route: '', name: 'home', moduleId: 'home' },
]);
this.router = router;
}
}
<template>
<div class="row">
<div class="deleted-element">
<p>Notice this content is deleted</p>
<slot name="aside-content"></slot>
</div>
<div class="deleted-element">
<slot name="main-content"></slot>
</div>
</div>
</template>
<template>
<div slot="main-content">
<div class="class-present">
<h2>${left}</h2>
</div>
</div>
<div slot="aside-content">
<div class="class-present">
<h2>${right}</h2>
</div>
</div>
</template>
export class Home {
constructor() {
this.left = 'left message';
this.right = 'right message';
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app>
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment