Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / app.html
Last active November 22, 2017 19:43
Aurelia Observer Test + evaluate + connectable-binding change + fix
<template>
<require from="./example"></require>
<binding-intercept-example if.bind="show"></binding-intercept-example>
</template>
@niieani
niieani / app.html
Last active June 25, 2016 20:31
Aurelia Observer Test + evaluate + connectable-binding change
<template>
<require from="./example"></require>
<binding-intercept-example if.bind="show"></binding-intercept-example>
</template>
@niieani
niieani / app.html
Last active June 25, 2016 12:22
Aurelia Observer Test + evaluate
<template>
<require from="./binding-intercept"></require>
<binding-intercept-example if.bind="show"></binding-intercept-example>
</template>
@niieani
niieani / app.html
Last active June 25, 2016 11:33
Aurelia Observer Test
<template>
<require from="./binding-intercept"></require>
<binding-intercept-example if.bind="show"></binding-intercept-example>
</template>
@niieani
niieani / concept.md
Last active June 24, 2016 23:56
Aurelia Binding Proxies Proposition

Binding Proxy concept

@inlineView(`<template>
  <input value.bind="firstName">
</template>`)
class Example {

  @bindingProxy firstName(bindingValueSetter) {
 // function run when the binding is bound, returns an object:
@niieani
niieani / binding-function.ts
Created June 8, 2016 18:36
Binding Function interface idea
interface BindingFunction {
/**
* invoked by Aurelia when the binding is bound
* updateView is a method that can be used to update the binding
* parameters is an array of evaluated parameters passed to the binding at the time of binding
*/
subscribe(updateView: (newValue) => void, parameters: Array<any>)
/**
@niieani
niieani / aurelia-dependency-injection.d.ts
Last active June 4, 2016 18:48
aurelia-dependency-injection.d.ts comparison
/**
* Decorator: Indicates that the decorated class/object is a custom resolver.
*/
export declare const resolver: Function & {
decorates?: any;
};
/**
* Used to allow functions/classes to specify custom dependency resolution logic.
*/
export interface Resolver {
@niieani
niieani / app.html
Created June 1, 2016 22:20
Aurelia RequireJS Gist
<template>
<!-- Simple usage: -->
<h1>message: ${async(message).value}</h1>
<!-- With a placeholder: -->
<h1>message: ${async(message).value ? async(message).value : '...'}</h1>
</template>
@niieani
niieani / app.html
Created June 1, 2016 16:47
Aurelia Nested Router Problem
<template>
<router-view></router-view>
</template>
@niieani
niieani / app.html
Last active May 12, 2016 12:51
Aurelia Template Behaviour with repeat-items-changed
<template>
<require from="./attaching-span"></require>
<h1>${message}</h1>
<button click.delegate="addNumber('before')">Add number before</button>
<button click.delegate="addNumber('after')">Add number after</button>
<button click.delegate="addMany('before')">Add many before</button>
<button click.delegate="addMany('after')">Add many after</button>
<div>
<span repeat.for="number of numbers" repeat-items-changed.bind="repeatRendered">${number}</span>
</div>