Skip to content

Instantly share code, notes, and snippets.

@Vheissu
Last active March 31, 2017 14:39
Show Gist options
  • Save Vheissu/3b185675d541a6bcb34ea53c8e24ac69 to your computer and use it in GitHub Desktop.
Save Vheissu/3b185675d541a6bcb34ea53c8e24ac69 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></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>
<h1>My partial</h1>
<p>My HTML-only partial without a viewmodel.</p>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment