Skip to content

Instantly share code, notes, and snippets.

View manuel-guilbault's full-sized avatar

Manuel Guilbault manuel-guilbault

View GitHub Profile
@manuel-guilbault
manuel-guilbault / app.html
Created November 16, 2016 21:31
gets across elements
<template>
<require from="./switch"></require>
<span>${toggleState}</span><br />
<label for="toggle">Toggle: </label>
<switch id="toggle" value.bind="toggleState" disabled.bind="isCalling"></switch>
</template>
@manuel-guilbault
manuel-guilbault / Aurelia-Focus-Article
Last active November 20, 2015 05:52
Aurelia-Focus-Article
## Introduction ##
I've been a huge fan of [Durandal](http://durandaljs.com/) and [Knockout JS ](http://knockoutjs.com/) for many years now, and I've been closely following Aurelia since I first heard about it. After playing with it for a while, I noticed that one of the features I used with Knockout was missing from Aurelia: a ```focus```binding. I decided to take advantage of the [Custom Attribute](http://aurelia.io/docs.html#custom-attributes) API to develop a ```focus``` custom attribute for Aurelia.
## Requirements ##
The custom attribute I have in mind would be used this way:
``` javascript
export class ViewModel {