Skip to content

Instantly share code, notes, and snippets.

@BruceL33t
Forked from fabioluz/app.html
Created March 17, 2017 01:10
Show Gist options
  • Save BruceL33t/a144dbcfce62daca96c780caad8f75cd to your computer and use it in GitHub Desktop.
Save BruceL33t/a144dbcfce62daca96c780caad8f75cd to your computer and use it in GitHub Desktop.
<template>
<router-view layout-view="default.html" layout-view-model="default"></router-view>
</template>
export class App {
configureRouter(config, router){
config.map([
{ route: '', name: 'home', moduleId: 'home' },
]);
this.router = router;
}
constructor (){
}
}
<template>
${test}
<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>
export class Default {
constructor() {
this.test = 'lol'
}
}
<template>
<div slot="main-content">
<div class="class-present">
<h2>${left}${parent.test}</h2>
</div>
</div>
<div slot="aside-content">
<div class="class-present">
<h2>${right}</h2>
</div>
</div>
</template>
import {Default} from './default'
import {inject} from 'aurelia-framework'
@inject(Default)
export class Home {
constructor(parent) {
this.parent = parent;
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