Skip to content

Instantly share code, notes, and snippets.

@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/>
@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 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:25
Aurelia + i18n plugin with not valid config of namespaces, throws 404 for translation ns
<template>
<h1>${message}</h1>
<div>${'val' | t} ${'tr1:val1' | t}</div>
<button click.trigger="changeLocale('de')">de</button>
<button click.trigger="changeLocale('en')">en</button>
</template>
@valichek
valichek / app.html
Last active May 4, 2016 14:25
Aurelia + i18n plugin with not valid config of namespaces, throws 404 for translation ns
<template>
<h1>${message}</h1>
<div>${'val' | t} ${'tr1:val1' | t}</div>
<button click.trigger="changeLocale('de')">de</button>
<button click.trigger="changeLocale('en')">en</button>
</template>
@valichek
valichek / main.js
Last active October 8, 2017 22:33
Aurelia Webpack basic config (jquery, bootstrap, i18n, validation)
var Promise = require('bluebird'); // Promise polyfill for IE11
// Bluebird config
Promise.config({
// Enable warnings
warnings: true,
// Enable long stack traces
longStackTraces: true,
// Enable cancellation
cancellation: false,
// Enable monitoring
@valichek
valichek / app.html
Last active March 1, 2017 22:06
Aurelia Skeleton list list-item implementation
<template>
<require from="./list"></require>
<div>List</div>
<list></list>
</template>
// Copyright 2015 Simon Schmidt
// Copyright 2012 Junqing Tan <[email protected]> and The Go Authors
// Use of this source code is governed by a BSD-style
// Part of source code is from Go fcgi package
// Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15
// By: wofeiwo
package fcgiclient
<template>
<ul class="nav nav-tabs">
<li role="presentation" click.delegate="$parent.selectTab(tab)" repeat.for="tab of tabs" class="${ $parent.selectedTab === tab ? 'active' : '' }"><a href="#">${ tab.heading }</a></li>
</ul>
<div style="margin-top:8px">
<content></content>
</div>
</template>
@valichek
valichek / compiler.ts
Last active September 17, 2015 21:54 — forked from charlespockert/compiler.ts
Kendo grid with Aurelia
import {inject, ViewCompiler, ViewResources, Container} from 'aurelia-framework';
/**
* Compiler service
*
* compiles an HTML element with aurelia
*/
@inject(ViewCompiler, ViewResources, Container)
export class Compiler {