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 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 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">

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:50
Aurelia - Search Input
<template>
<require from="./search"></require>
<search execute.call="doSearch(query)" delay.bind="400"></search>
<ul>
<li repeat.for="query of queries">${query}</li>
</ul>
</template>
@jdanyow
jdanyow / app.html
Last active March 6, 2016 04:50
Numeral - All languages
<template>
<require from="./currency-value-converter"></require>
<label>
Language:
<select value.bind="selectedLanguage">
<option repeat.for="language of languages" value.bind="language">${language}</option>
</select>
</label>
@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>
@jdanyow
jdanyow / app.html
Created March 7, 2016 01:13
Aurelia - disable automatic object creation
<template>
<require from="./debug"></require>
<input value.bind="foo.bar.baz">
<debug></debug>
</template>
<template>
<require from="./let"></require>
<let foo.bind="bar"></let>
<div if.bind="foo">Test</div>
${message}
</template>
<template>
<input value.bind="numberToAdd" />
<button click.delegate="add()">Add</button>
<button click.delegate="clear()">Clear</button>
<p>Try adding 5 or more rows/cols, then clearing and adding again.</p>
<table>
<tbody>
<tr repeat.for="r of rows">
<template>
<require from="elem"></require>
<button click.delegate="show()">Show</button>
<elem if.bind="item.visible" item.bind="item"></elem>
</template>