Skip to content

Instantly share code, notes, and snippets.

View jdanyow's full-sized avatar
💭
Confirming my whereabouts

Jeremy Danyow jdanyow

💭
Confirming my whereabouts
View GitHub Profile
@jdanyow
jdanyow / app.html
Last active February 8, 2018 16:58
Aurelia Dependency Injection: OptionalParent resolver
<template>
<require from="myelem"></require>
<myelem name.bind="'outer'">
<h3>inside myelem</h3>
<myelem name.bind="'inner'">
<h4>inside inside ... </h4>
</myelem>
</myelem>
</template>
<template>
<require from="./widget-picker"></require>
<widget-picker widget.bind="shipment.widget" widgets.bind="widgets"></widget-picker>
</template>
@jdanyow
jdanyow / app.html
Last active March 6, 2016 16:03 — forked from peisenmann/au-class.js
Au-Class custom attribute for simplifying bound CSS declarations
<template>
<h1>${message}</h1>
</template>

Aurelia Checkbox Problem

This plunkr is to demonstrate a problem I am having with checkbox binding in Aurelia.

Here are the steps to reproduce:

  1. Select "Field 1" and check the box for the value "A"
  2. Now select "Field 2" and check the box for the value "1"
  3. Select "Field 1" again. You will see that "A" is not checked
  4. Check the box for "B" on "Field 1" and "A" will become checked again as well.
@jdanyow
jdanyow / app.html
Last active March 6, 2016 04:47
Aurelia Plunker v0.11.10
<template>
<form submit.delegate="submit()" if.bind="show">
<label>
Email:
<input type="email" value.bind="email" placeholder="Enter Email" name="email">
</label>
<p>${email}</p>
<label>
Password:
<input type="password" value.bind="password" placeholder="Enter Password" name="password">
@jdanyow
jdanyow / app.html
Last active March 6, 2016 04:47
Aurelia - Creating a wrapper around a compose binding and bind to the composed view model
<template>
<require from="./widget-wrapper"></require>
<widget-wrapper module-name="foo"></widget-wrapper>
</template>
@jdanyow
jdanyow / app.html
Last active March 6, 2016 04:47
Aurelia - Creating a wrapper around a compose binding and bind to the composed view model
<template>
<require from="./widget-wrapper"></require>
<widget-wrapper module-name="foo"></widget-wrapper>
</template>
@jdanyow
jdanyow / app.html
Last active November 29, 2017 01:39
Google reCAPTCHA with Aurelia
<template>
<require from="./recaptcha"></require>
<form action="?" method="POST">
<recaptcha theme="light" verified.call="onVerified($event)"></recaptcha>
<recaptcha theme="dark" verified.call="onVerified($event)"></recaptcha>
<br>
<input type="submit" value="Submit">
<template>
<require from="./panel"></require>
<panel repeat.for="panel of panels"
header-text.bind="panel" close.call="close($index)">
Panel ${panel} Content
</panel>
</template>
@jdanyow
jdanyow / app.html
Last active March 6, 2016 04:45
Aurelia - AccessMember automatically creates objects
<template>
<require from="./debug"></require>
<button click.delegate="toggle()">toggle</button>
<input if.bind="show" value.bind="foo.bar">
<debug></debug>
</template>