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
Created April 27, 2016 23:44
Aurelia simple repeat
<template>
<a href="#!" click.delegate="selectUser(user.id)" class="collection-item ${user.state}" repeat.for="user of users" id="user-${user.id}">
<span if.bind="!user.lastName">${user}</span>
<span if.bind="user.firstName">${user.lastName}, ${user.firstName}</span>
</a>
</template>
@jsobell
jsobell / app.html
Created April 29, 2016 05:47
Aurelia simple repeat
<template>
Current user: ${chosenuser.lastName}
<select class="form-control control-label" value.bind="chosenuser" >
<option repeat.for="user of users" model.bind="user">
${user.firstName} </option>
</select>
</template>
@jsobell
jsobell / app.html
Last active April 29, 2016 05:55
Aurelia simple repeat
<template>
Current user ID: <input type='number' value.bind='chosenuserid' /> (${chosenuserid})
<select class="form-control control-label" value.bind="chosenuserid" >
<option repeat.for="user of users" value.bind="user.id">
${user.firstName} </option>
</select>
</template>
@jsobell
jsobell / app.html
Last active April 29, 2016 07:31
status updates
<template>
<button click.delegate='v=!v'>Show Hi!</button>
<div show.bind='v'>Hi !</div>
</template>
@jsobell
jsobell / app.html
Created April 29, 2016 12:27
Aurelia
<template>
<h1>${viewName}</h1>
<p><input value.bind='service1.model.data'/></p>
<p1>Service1 data: ${service1.model.data}</p1></br>
<p1>Service2 data: ${service2.model.data}</p1>
</template>
@jsobell
jsobell / app.html
Created May 2, 2016 06:27
Aurelia simple repeat
<template>
<h1>Do stuff in here</h1>
</template>
@jsobell
jsobell / app.html
Created May 2, 2016 06:32
Aurelia simple repeat
<template>
<h1>Do stuff in here</h1>
</template>
@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 4, 2016 07:01
Aurelia RequireJS Gist
<template>
<require from='whatami'></require>
<h1>X = ${x}</h1>
<div ref='content'>
<div whatami='12' class='${x}' imstillhere='aa' wheredidigo='${x}' data-what='${x}'>${x}</div>
</div>
<pre>
${content.innerHTML}
</pre>
@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>