Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Aurelia in Action Chapter 2 - Exercise 2.2
<template>
<h1>${message}</h1>
<form submit.trigger="greet()">
<input type="text" value.bind="greeting"></input>
<input type="submit" value="greet"></input>
</form>
</template>
export class App {
message = 'Hello Aurelia in Action!';
constructor(){
this.greeing = "";
}
greet(){
this.message = this.greeting;
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body{
font: 400 14px/1.6 "Open Sans",sans-serif;
}
</style>
</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment