Skip to content

Instantly share code, notes, and snippets.

View sylvain-hamel's full-sized avatar

Sylvain Hamel sylvain-hamel

  • www.octopus-itsm.com
  • Montreal, Canada
View GitHub Profile
@sylvain-hamel
sylvain-hamel / gist:9122684
Last active August 29, 2015 13:56
mockDirectiveController
// Usage :
//
// 1 - Load the real module
// ============================
// beforeEach(module('app', 'partials/my-directive.html'));
//
// 2 - Create the mock constructor function and call module(mockDirectiveController(...))
// ============================
// beforeEach(function () {
// function CtrlMock() {
@sylvain-hamel
sylvain-hamel / gist:9945167
Last active August 29, 2015 13:58
merged changelog

Today

Karma 1.22.2

Features

  • feat 1
  • feat 2

Fixes

  • feat 1

this:

someting
.then(function(){
});

is turned into:

@sylvain-hamel
sylvain-hamel / gist:332aeba3d9e65075c539
Created January 27, 2016 04:35
aurelia scoped instance using autoRegistrer
import {Container, singleton} from 'aurelia-dependency-injection';
describe('DI scoped singletong', () => {
@singleton(true)
class Foo{}
it('should work the way I think :)', () => {
let rootContainer = new Container();
@sylvain-hamel
sylvain-hamel / app.html
Last active March 31, 2016 23:58 — forked from jdanyow/app.html
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@sylvain-hamel
sylvain-hamel / app.html
Created April 7, 2016 00:55
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@sylvain-hamel
sylvain-hamel / app.html
Last active September 7, 2016 08:49
binding two values
<template>
<div>
foo.value <input type="text" value.bind="foo.value">
</div>
<div>
bar.value <input type="text" value.bind="bar.value">
</div>
@sylvain-hamel
sylvain-hamel / app.html
Created August 11, 2016 03:03 — forked from jdanyow/app.html
Aurelia compose vs element
<template>
<require from="./e1"></require>
<div repeat.for="i of 200" style="display:inline-block">
<e1 value.bind="i"></e1>
</div>
<div repeat.for="i of 200" style="display:inline-block">
<compose view-model="./c1" containerless></compose>
</div>
@sylvain-hamel
sylvain-hamel / app.html
Last active August 11, 2016 20:22
Set attributes from jQuery
<template>
<require from="./e1"></require>
<e1 value.bind="'initial'"></e1>
</template>
@sylvain-hamel
sylvain-hamel / app.html
Created August 16, 2016 03:13
Set attributes from jQuery
<template>
<require from="./e1"></require>
<e1 value.bind="'initial'"></e1>
</template>