Skip to content

Instantly share code, notes, and snippets.

@fkleuver
Last active October 28, 2020 22:59
Show Gist options
  • Save fkleuver/b26b6c9cb5244dda34cded5a5525f8cf to your computer and use it in GitHub Desktop.
Save fkleuver/b26b6c9cb5244dda34cded5a5525f8cf to your computer and use it in GitHub Desktop.
aurelia vanilla test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dumber Gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<base href="/">
</head>
<!--
Dumber Gist uses dumber bundler, the default bundle file
is /dist/entry-bundle.js.
The starting module is pointed to "main" (data-main attribute on script)
which is your src/main.js.
-->
<body>
<my-app></my-app>
<script src="/dist/entry-bundle.js" data-main="main"></script>
</body>
</html>
{
"dependencies": {
"aurelia": "dev"
}
}
import Aurelia, { CustomElement, shadowCSS } from 'aurelia';
Aurelia.app(CustomElement.define({
name: 'my-app',
template: '${message}',
dependencies: [shadowCSS(':host{background-color:blue}')],
shadowOptions: { mode: 'open' }
}, class {
message = 'Hello world';
})).start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment