Skip to content

Instantly share code, notes, and snippets.

View jsobell's full-sized avatar

Jason Sobell jsobell

View GitHub Profile
@jsobell
jsobell / app.html
Last active March 16, 2016 14:43 — forked from opcodewriter/app.html
Aurelia If Bind test on template part
<template>
<section>
<h2>Cascading Selects Example</h2>
<form role="form" submit.delegate="submit()">
<div class="form-group">
<label for="levelOne">Level 1</label>
<select id="levelOne" name="levelOne" value.bind="levelOne">
<option value="">Select a level 1 item</option>
@jsobell
jsobell / app.html
Last active December 10, 2021 16:05 — forked from jdanyow/app.html
Check all Example
<template>
<h1>${message}</h1>
<a href='#' click.delegate='checkall()'>Check all</a>
<ul>
<li repeat.for='c of checked'><input type='checkbox' checked.bind='c.checked'>Checked ${c.value} : ${c.checked} </li>
</ul>
</template>
@jsobell
jsobell / app.html
Last active May 6, 2016 07:57 — forked from paulharker/app.html
Dynamic Routes By Model
<template>
<require from="nav-bar.html"></require>
<require from="styles.css"></require>
<require from="panels.css"></require>
<nav-bar router.bind="router"></nav-bar>
<div class="page-host">
<router-view></router-view>
@jsobell
jsobell / app.html
Created June 6, 2016 01:04
Aurelia RequireJS Gist
<template>
<ul>
<li>
Inspect Div A and Div B in dev tools
and pay attention to their classes.
</li>
<li>
Click all of the "click me" text and observe Div A and Div B classes change.
</li>
</ul>
@jsobell
jsobell / app.html
Created July 14, 2016 00:29 — forked from niieani/app.html
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing + 9000 elements]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
<template>
<div>Div below (pink border) will become visible if value > 0</div>
<input type='checkbox' checked.bind='value & debounce:1000'>
<div>Double click the button when the value (displayed on the button) is '-1' to produce this issue</div>
<div if.bind='value' style="margin: 20px; border: 1px solid #E69">${value} ${value < 0 ? 'ERROR: Should not stay visible' : ''}</div>
</template>
@jsobell
jsobell / app.html
Last active November 26, 2020 14:58 — forked from jdanyow/app.html
Aurelia Validation Demo - Nested Property validation
<template>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<input type="text" class="form-control" id="last" placeholder="Last Name"
value.bind="person.firstName & validate">
</div>
@jsobell
jsobell / app.html
Last active August 31, 2016 07:37 — forked from kevmeister68/app.html
Aurelia processContent( ) problem -- view.bind( ) does not bind to custom element correctly.
<template>
<require from="hc-ui-tabcontrol"></require>
<button click.trigger='tc.handleClickEvent("TEST")'>TEST</button>
<button click.trigger='showTC()'>showTC</button>
<ui-tabcontrol controller.ref='tc'>
<tab-page>
<tab-heading>Heading1</tab-heading>
@jsobell
jsobell / app.html
Last active September 7, 2016 13:43 — forked from jdanyow/app.html
Aurelia confirm password validation demo
zXDcv<template>
<form submit.delegate="submit()" novalidate autocomplete="off">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="password">Password</label>
<input type="password" class="form-control" id="password" placeholder="Password"
value.bind="password & validate"
>
</div>
@jsobell
jsobell / app.html
Last active September 3, 2016 11:15 — forked from y2k4life/app.html
Display Validation success, and allow reset...
<template>
<div>
<a href="http://aurelia.io/hub.html#/doc/article/aurelia/validation/latest/validation-basics/9" target="top">Documentation</a>
</div>
<form submit.delegate="submit()" novalidate autocomplete="off">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="A">String A</label>
<input type="text" class="form-control" id="A" value.bind="A & validate">