Skip to content

Instantly share code, notes, and snippets.

@tdamir
Forked from niieani/app.html
Created January 10, 2017 15:18
Show Gist options
  • Save tdamir/971fbd6cc2b027806497d5efc55aa893 to your computer and use it in GitHub Desktop.
Save tdamir/971fbd6cc2b027806497d5efc55aa893 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