Skip to content

Instantly share code, notes, and snippets.

View charlespockert's full-sized avatar

Charles Pockert charlespockert

View GitHub Profile
@charlespockert
charlespockert / date-picker.html
Created May 5, 2015 16:20
Bootstrap datepicker for Aurelia
<template>
<div class="input-group date">
<input type="text" value.bind="value" class="form-control"><span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
</div>
</template>
@charlespockert
charlespockert / aurelia-kendo-autocomplete.ts
Created August 20, 2015 22:02
Example of kendo Autocomplete box in Aurelia
import {inject, customAttribute, bindable} from 'aurelia-framework';
import {HttpClient} from 'aurelia-http-client';
import * as kendoUi from 'kendo-ui';
import 'kendo-ui/styles/kendo.common-bootstrap.min.css!';
import 'kendo-ui/styles/kendo.bootstrap.min.css!';
@customAttribute('kendo-autocomplete')
@inject(Element, HttpClient)
export class KendoAutocomplete {
@charlespockert
charlespockert / compiler.ts
Last active October 20, 2015 07:10
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 {
<require from="test"></require>
<test></test>
<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>
@charlespockert
charlespockert / test-value-converter.js
Created September 7, 2015 07:46
Bumping an array filtering value converter in Aurelia
export class TestValueConverter {
toView(value, selected, rebind) {
console.log("Running value converter");
return value.filter(val => {
var found = false;
selected.forEach(sel => {
if (val.toLowerCase().indexOf(sel) > -1)
@charlespockert
charlespockert / alt-layout.html
Created May 12, 2016 15:31
Aurelia router with layouts
<template>
<section class="au-animate">
<div class="well">
<content select="#navigation"></content>
</div>
<div>
<content select="#content"></content>
</div>
</section>
</template>
@charlespockert
charlespockert / app.html
Last active May 18, 2016 21:37 — forked from valichek/app.html
Aurelia + i18n plugin issue with binding behaviour
<template>
<require from="tbind.js"></require>
<h1>${message}</h1>
<h2>${prop}</h2>
<div>${'val1' & t2}</div>
<div>${'val1' & t2}</div>
<div>${'val1' & t2}</div>
<hr/>
<div>
<compose containerless view.bind="'custom-view.html'"></compose>
@charlespockert
charlespockert / app.html
Last active May 18, 2016 21:36
Aurelia + i18n plugin issue with binding behaviour
<template>
<require from="tbind.js"></require>
<h1>${message}</h1>
<h2>${prop}</h2>
<div>${'val1' & t & debounce}</div>
<div>${'val1' & t & throttle}</div>
<div>${'val1' & t}</div>
<hr/>
<div>
<compose containerless view.bind="'custom-view.html'"></compose>
@charlespockert
charlespockert / app.html
Created May 14, 2016 13:56
Aurelia + i18n plugin issue with binding behaviour
<template>
<h1>${message}</h1>
<div>${val1 & t & debounce}</div>
<div>${val1 & t & throttle}</div>
<div>${(val1) & t }</div>
<hr/>
<div>
<compose containerless view.bind="'custom-view.html'"></compose>
</div>
<hr/>