Skip to content

Instantly share code, notes, and snippets.

@djedi
Forked from Vheissu/app.html
Last active March 31, 2017 14:41
Show Gist options
  • Save djedi/044dad26eda6e86aec61b4bd86064b34 to your computer and use it in GitHub Desktop.
Save djedi/044dad26eda6e86aec61b4bd86064b34 to your computer and use it in GitHub Desktop.
Example of a HTML only partial for the book -- Aurelia For Real World Web Applications available here: https://leanpub.com/aurelia-for-real-world-applications/
<template>
<require from="./my-element.html"></require>
<my-element heading="This is the heading" body-text="This is the bodyText"></my-element>
</template>
export class App {
}
<!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>
<template bindable="heading, bodyText">
<h1>${heading}</h1>
<p>${bodyText}</p>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment