Skip to content

Instantly share code, notes, and snippets.

@AshleyGrant
Forked from jdanyow/app.html
Last active December 23, 2016 01:27
Show Gist options
  • Save AshleyGrant/76ef47a5327a34560737f4ade1038305 to your computer and use it in GitHub Desktop.
Save AshleyGrant/76ef47a5327a34560737f4ade1038305 to your computer and use it in GitHub Desktop.
select2 multiple example
<template>
<require from="./flash-message"></require>
<flash-message view-model.ref="flash"></flash-message>
</template>
export class App {
attached(params, routeConfig) {
this.flash.setMessage('Activate');
}
}
<template>
<div class="alert alert-success">${message}</div>
</template>
import {bindable, bindingMode} from 'aurelia-framework';
export class FlashMessage {
@bindable({defaultBindingMode: bindingMode.twoWay}) message = 'Default';
setMessage(newValue) {
this.message = newValue;
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div aurelia-app>
<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>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment