Skip to content

Instantly share code, notes, and snippets.

@freshcutdevelopment
Last active February 19, 2019 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save freshcutdevelopment/5d8b3973b5d752c0d2c79e817355b24a to your computer and use it in GitHub Desktop.
Save freshcutdevelopment/5d8b3973b5d752c0d2c79e817355b24a to your computer and use it in GitHub Desktop.
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