Skip to content

Instantly share code, notes, and snippets.

@AshleyGrant
Forked from jdanyow/app.html
Created July 22, 2016 17:38
Show Gist options
  • Save AshleyGrant/fb3631fe09d44395fd352c29e145c4a0 to your computer and use it in GitHub Desktop.
Save AshleyGrant/fb3631fe09d44395fd352c29e145c4a0 to your computer and use it in GitHub Desktop.
Aurelia autocomplete
<template>
<div class="row">
<div class="col-sm-3" repeat.for="image of images">
<div class="thumbnail">
<img src.bind="image" />
<div class="caption text-center">
<button type="button" class="btn btn-default" click.trigger="setCoverPhoto($index)" data-toggle="tooltip" title="Use as cover">Set Cover</button>
<button type="button" class="btn btn-default" click.trigger="removeAttachment($index)" data-toggle="tooltip" title="Remove photo">Remove</button>
</div>
</div>
</div>
</div>
</template>
export class App {
images = [
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
'https://placehold.it/200x200',
];
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</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