Skip to content

Instantly share code, notes, and snippets.

View funky-jojo's full-sized avatar

Joseph Gabriel funky-jojo

View GitHub Profile
@funky-jojo
funky-jojo / app.html
Last active February 9, 2017 19:06
Aurelia Gist
<template>
<require from="./toggle-badge"></require>
<toggle-badge text="North Carolina" checked.bind="inboundLanes"></toggle-badge>
<toggle-badge text="South Carolina" checked.bind="inboundLanes"></toggle-badge>
<div>Selected Lanes:</div>
<div repeat.for="lane of inboundLanes">${lane}</div>
<hr/>
<label><input type="checkbox" model.bind="'North Carolina'" checked.bind="outboundLanes">North Carolina</label>
@funky-jojo
funky-jojo / app.html
Last active January 9, 2017 17:13 — forked from ScottWhittaker/app.html
Aurelia Router CanActivate Demo
<template>
<require from="components/navigation.html"></require>
<h1>Aurelia Router CanActivate Redirect Bug Demo</h1>
<p>
Repro steps:
</p>
<ol>
<li>Load the page with settings as the specified route: <a target="_blank" href="https://gist.host/run/1483977856446/index.html#/settings">https://gist.host/run/1483977856446/index.html#/settings</a></li>
<li>Click "Cancel" on the confirm dialog. This will redirect to the 'home' route.</li>
<li>Click "Settings" menu. Click "Cancel" on the confirm dialog. This will cancel the navigation, and remain on the current route.</li>
<template>
<require from="list"></require>
<list items.bind="list"></list>
</template>
@funky-jojo
funky-jojo / app.html
Created September 14, 2016 13:00 — forked from niieani/app.html
Aurelia Gist [Demonstrate dynamic compose]
<template>
<h2>dynamic view model by path</h2>
<button click.trigger="loadNewViewModel()">Load different vm</button>
<compose view-model="${currentViewModel}"></compose>
</template>
@funky-jojo
funky-jojo / app.html
Created September 10, 2016 18:39
Aurelia Validation Demo - SubElement
<template>
<router-view></router-view>
</template>
@funky-jojo
funky-jojo / app.html
Last active September 11, 2016 23:55 — forked from jsobell/app.html
Aurelia Validation Demo - SubElement
<template>
<router-view></router-view>
</template>
@funky-jojo
funky-jojo / app.html
Last active September 1, 2016 03:00 — forked from jdanyow/app.html
Aurelia CanActivate redirect bug
<template>
<h1>${message}</h1>
<h3>Steps to demonstrate:</h3>
<div><a href="https://gist.host/run/1472695581644/index.html#/children/child2" target="_blank">
Click to load "#/children/child2" in a new tab</a> ( redirect("children/child1") works)
</div>
<br>
<div><button click.trigger="navigateToChild2()">Go</button>
@funky-jojo
funky-jojo / require-intellisense.js
Created March 27, 2013 15:39
require-intellisense.js as referenced in this article: http://www.codeproject.com/Articles/460836/Making-the-most-out-of-JavaScript-Intellisense-in. This enables intellisense with AMD modules.
/// <reference path="require.js" />
(function () {
var DEBUG = 3, WARN = 2, ERROR = 1, NONE = 0;
//Set the logging level
var logLevel = DEBUG;
function log(level) {
var msg = Array.prototype.slice.call(arguments, 1);