Skip to content

Instantly share code, notes, and snippets.

@AshleyGrant
Created August 7, 2017 14:31
Show Gist options
  • Save AshleyGrant/a8f11e779253a1c6abb44dbec77a8b83 to your computer and use it in GitHub Desktop.
Save AshleyGrant/a8f11e779253a1c6abb44dbec77a8b83 to your computer and use it in GitHub Desktop.
Aurelia Gist
<template>
Hello ${data.name}!
</template>
import {bindable} from 'aurelia-framework';
export class AccountInfo {
@bindable data;
}
<template>
<require from="./account-info"></require>
<div><input type="text" value.bind="userData.name" /></div>
<account-info data.bind="userData"></account-info>
</template>
export class App {
userData = {
name: 'Ashley'
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js" crossorigin="anonymous"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment