Skip to content

Instantly share code, notes, and snippets.

@plwalters
Last active March 25, 2016 21:49
Show Gist options
  • Save plwalters/0a88e7c7b61a51ae8543 to your computer and use it in GitHub Desktop.
Save plwalters/0a88e7c7b61a51ae8543 to your computer and use it in GitHub Desktop.
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
import {SomeClass, someOtherFunction} from './some-class';
export class App {
message = 'Hello World!';
static inject = [SomeClass];
constructor(someClass) {
this.someClass = someClass;
this.someClass.someFunction();
someOtherFunction();
}
}
<!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-plunker/v0.11.10/jspm_packages/system.js"></script>
<script src="https://cdn.rawgit.com/jdanyow/aurelia-plunker/v0.11.10/config2.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
export class SomeClass {
someFunction() {
console.log('hey');
}
}
export function someOtherFunction() {
console.log('hey');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment