Skip to content

Instantly share code, notes, and snippets.

View AshleyGrant's full-sized avatar

Ashley Grant AshleyGrant

  • Vagabond
View GitHub Profile
@AshleyGrant
AshleyGrant / app.html
Last active November 20, 2017 00:37 — forked from jdanyow/app.html
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@AshleyGrant
AshleyGrant / app.html
Created May 21, 2017 17:21
D3 + Aurelia
<template>
<router-view></router-view>
</template>
@AshleyGrant
AshleyGrant / app.html
Created May 21, 2017 17:07
D3 + Aurelia
<template>
<require from="./pager"></require>
<div pager="numberOfPages.bind: numberOfPages">Number of pages: ${numberOfPages}</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Created May 5, 2017 13:50
Binding in Aurelia
<template>
<require from="./pager"></require>
<div pager="numberOfPages.bind: numberOfPages">Number of pages: ${numberOfPages}</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Created April 17, 2017 17:42 — forked from kyelaman/app.html
Binding in Aurelia
<template>
<input type="text" value.one-way="firstName" />
<input type="text" value.one-time="lastName" />
${fullName}
<br /><button click.trigger="updateValues()">Update in VM</button>
</template>
@AshleyGrant
AshleyGrant / app.html
Created April 17, 2017 16:40 — forked from jdanyow/app.html
Different Bindings in Aurelia
<template>
<label>Two-Way Bound<input type="text" value.two-way="firstName" /></label><br />
<label>One-Way Bound<input type="text" value.one-way="firstName" /></label><br />
<label>One-Time Bound<input type="text" value.one-time="firstName" /></label><br />
firstName: ${firstName}
</template>
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
<template>
<style>
.active a { color: red; font-weight: bold; }
</style>
<ul>
<li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
<a href.bind="row.href">${row.title}</a>
</li>
</ul>
<router-view layout-view="shared-parent.html" layout-view-model="shared-parent"></router-view>
<template>
<a href="foo.html">A Non-Aurelia Page</a><br />
<a route-href="route: welcome">Welcome</a>
<div>
<router-view></router-view>
</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Last active March 2, 2017 21:48
Dynamic components in Aurelia
<template>
<require from="personnel-row"></require>
Is Compact: <input type="checkbox" checked.bind="isCompact" />
<table>
<tbody>
<tr as-element="personnel-row" repeat.for="person of personnel" person.bind="person" is-compact.bind="isCompact"></tr>
</tbody>
</table>