Skip to content

Instantly share code, notes, and snippets.

@niieani
Forked from jdanyow/app.html
Last active January 10, 2017 15:18
Show Gist options
  • Save niieani/f6152812e3b3cfa41bba to your computer and use it in GitHub Desktop.
Save niieani/f6152812e3b3cfa41bba to your computer and use it in GitHub Desktop.
Aurelia Gist
<template>
<require from="./test"></require>
compose: <compose view="test.html" view-model.bind="testInstance"></compose>
<hr/>
test: <test view-model.bind="testInstance"></test>
</template>
import {Test} from './test'
export class App {
testInstance = new Test('hello world')
}
<!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://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/jspm_packages/system.js"></script>
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/config.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
<template>
${message}
</template>
export class Test {
constructor(message) {
this.message = message || ':('
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment