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 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">
@jsobell
jsobell / app.html
Last active March 19, 2018 14:56
Aurelia Validation Demo - controller.validateTrigger=validateTrigger.change issue
<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>
<select value.bind="firstName & updateTrigger:'input' & validate">
<option value='Jason'>Jason</option>
<option value='Fred'>Fred</option>
<option value=''>None</option>
@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 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
Created August 30, 2016 10:47
Aurelia Validation Demo
<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="first" placeholder="First Name"
value.bind="firstName & validate">
</div>
@jsobell
jsobell / app.html
Last active August 30, 2016 16:16
Aurelia Validation Demo
<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="first" placeholder="First Name"
value.bind="firstName & validate">
</div>
@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 29, 2016 23:50
Event Aggregator Debugger
<template>
<compose view-model="header" view.bind="header.html"></compose>
<h1>${message}</h1>
Links:
<ul>
<li><a href='#/'>root</a></li>
<li><a href='#connect'>connect</a></li>
<li><a href='#connect/testapp'>connect/testapp</a></li>
<template>
<require from='./mydebounceBindingBehavior'></require>
<input type='checkbox' checked.bind='value & mydebounce:1000'>
<h3>${value}</h3>
</template>
<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>