Skip to content

Instantly share code, notes, and snippets.

View AshleyGrant's full-sized avatar

Ashley Grant AshleyGrant

View GitHub Profile
@AshleyGrant
AshleyGrant / app.html
Last active February 12, 2017 23:28 — forked from lstarky/app.html
Displaying the Json result in Table with some logic
<template>
<div class="container-fluid">
<div class="container-fluid">
<h1>Bootstrap Method (Responsive)</h1>
<p><i>The second column will wrap down below on smaller screens...
if you see it in one column, try widening the screen</i></p>
<div class="row">
<div class="col-xs-6">
<div repeat.for="field of myData | odds">
<p><b>${field.Key}:</b> ${field.value}</p>
@AshleyGrant
AshleyGrant / app.html
Last active February 26, 2019 17:50
Custom Elements
<template>
<require from="./entry"></require>
<h2 class='text-center'>Journal Entries</h2>
<div>
<entry repeat.for='entry of entries' entry.bind='entry' delete-function.call="deleteEntry(entry)"></entry>
</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Last active December 23, 2016 01:27 — forked from jdanyow/app.html
select2 multiple example
<template>
<require from="./flash-message"></require>
<flash-message view-model.ref="flash"></flash-message>
</template>
<template>
<div>
<select value.bind="val" if.bind="opts && !val">
<option repeat.for="opt of opts" model.bind="opt">${opt.firstName}</option>
</select>
<button click.delegate="getOpts()">Get</button>
</div>
<div if.bind="!opts || person">
<span>First Name: ${person.firstName}</span>
<button click.delegate="resetForm()" if.bind="val">Clear Selection</button>
@AshleyGrant
AshleyGrant / app.html
Created November 7, 2016 19:53 — forked from jdanyow/app.html
Simple Aurelia Gist
<template>
${message}
</template>
<template>
Control value: ${controlValue}
<form>
<div class="form-group">
<test></test>
<label for="color">Color</label>
<input type="text" value.bind="colorInfo.color" class="form-control" id="color">
<div>Color: ${colorInfo.color}</div>
</div>
<div class="form-group">
<template>
<require from="./inline-svg"></require>
<style>
.cool {
fill: red;
}
.worked {
fill: blue;
}
</style>
<template>
<require from="./list"></require>
<require from="./row"></require>
<list rows.bind="users">
<template replace-part="row-template">
<row name.bind="row.name"></row>
</template>
</list>
</template>
<template>
<require from="list"></require>
<require from="list-two"></require>
<div>
With Objects
<list items.bind="list"></list>
</div>
<div>
With Strings
@AshleyGrant
AshleyGrant / app.html
Created October 6, 2016 23:16 — forked from jdanyow/app.html
Aurelia Gist
<template>
<require from = "login-form"></require>
<h1>Login</h1>
<login-form></login-form>
</template>