Skip to content

Instantly share code, notes, and snippets.

@valichek
valichek / app.html
Last active May 29, 2017 20:52
Aurelia + i18n plugin
<template>
<h1>${message}</h1>
<div>${'val1' & t} ${'custom:val' & t}</div>
<button click.trigger="changeLocale('de')">de</button>
<button click.trigger="changeLocale('en')">en</button>
</template>
@valichek
valichek / app.html
Created May 4, 2016 14:36
Aurelia + i18n plugin
<template>
<h1>${message}</h1>
<div>${'val1' & t} ${'custom:val' & t}</div>
<button click.trigger="changeLocale('de')">de</button>
<button click.trigger="changeLocale('en')">en</button>
</template>
@valichek
valichek / app.html
Last active May 13, 2016 07:19
Aurelia + i18n plugin issue with binding behaviour
<template>
<h1>${message}</h1>
<h2>${prop}</h2>
<div if.bind="true">${'val1' & t} ${'custom:val' & t} ${'val1'+prop & t} ${'val1'+getLabel(prop) & t}</div>
<hr/>
<div>
<compose containerless view.bind="'custom-view.html'"></compose>
</div>
<hr/>
<template>
<h1>${message}</h1>
<require from="./object-values-value-converter"></require>
<div repeat.for="value of object | objectValues">
${value}
</div>
</template>
@valichek
valichek / app.html
Last active May 14, 2016 10:16
Aurelia + i18n plugin issue with binding behaviour
<template>
<h1>${message}</h1>
<h2>${prop}</h2>
<div>${'val1' & t}</div>
<div>${'val1' & t}</div>
<hr/>
<div>
<!--<compose containerless view.bind="'custom-view.html'"></compose>-->
</div>
<hr/>
@valichek
valichek / app.html
Last active May 13, 2016 15:04
Aurelia Value Proxy idea
<template>
<require from="value-proxy"></require>
<value-proxy view-model.ref="personJson" value.bind="stringify(person)"></value-proxy>
${personJson.value}
</template>
@valichek
valichek / app.html
Last active May 19, 2016 13:30
Aurelia templating issue when using as-element="compose", require and repeat.for with <td>
<template>
<require from="./stringify"></require>
<table>
<tbody>
<tr><td>1 row ${{row: 1} | stringify}</td></tr>
<tr><td>2 row</td></tr>
</tbody>
</table>
@valichek
valichek / app.html
Last active May 19, 2016 13:34
Aurelia templating issue when using as-element="compose", require and repeat.for with <td>
<template>
<require from="./stringify"></require>
<table>
<tbody>
<tr><td>1 row ${{row: 1} | stringify}</td></tr>
<tr><td>2 row</td></tr>
</tbody>
</table>
@valichek
valichek / app.html
Last active June 15, 2016 13:14 — forked from jdanyow/app.html
Default slot content is not rendered when content of component is empty issue
<template>
<require from="./custom"></require>
<h2>Example 1: (rendered)</h2>
<custom>
<div slot="first">
<p>First slot</p>
</div>
</custom>
@valichek
valichek / app.html
Last active June 16, 2016 09:03
Slots and binding context issue
<template>
<require from="./custom"></require>
<custom>
<button click.delegate="doSmth()">First slot</button>
</custom>
<custom>
<!--comment here-->
</custom>