Skip to content

Instantly share code, notes, and snippets.

View Thanood's full-sized avatar

Daniel Bendel Thanood

  • Cologne, Germany
View GitHub Profile
@Thanood
Thanood / app.html
Created September 16, 2016 05:21
Aurelia - Materialize async autocomplete
<template>
<md-input md-autocomplete="values.bind: values;" md-label="put some text here" md-value.bind="textValue" md-disabled.bind="isBusy"></md-input>
<md-progress md-type="circular" md-color="green" show.bind="isBusy"></md-progress>
</template>
@Thanood
Thanood / app.html
Created September 19, 2016 15:40 — forked from harrol/app.html
Aurelia RequireJS Gist
<template>
Nested template elements in Internet Explorer 11
<table>
<thead>
<tr>
<th>Date</th>
<th>Amount</th>
</tr>
@Thanood
Thanood / app.html
Created September 27, 2016 14:52 — forked from vegarringdal/app.html
Aurelia ViewCompiler issue solved
<template>
<require from="./my-element"></require>
<require from="./my-template"></require>
<h1>Aurelia has been loaded</h1>
<my-element>
<my-template model.bind="appModel">
element property: ${elementProperty}<br/>
model title: ${title}
</my-template>
</my-element>
@Thanood
Thanood / app.html
Created October 4, 2016 12:16
Aurelia - Materialize Select issue #292
<template>
<select md-select="label: Label" value.two-way="model.value">
<option repeat.for="item of model.items" model.bind="item">${item.name}</option>
</select>
<div>
selected: ${model.value.id}
</div>
<hr/>
<select md-select="label: Label" value.two-way="model.selectedValue">
<option repeat.for="item of model.items" model.bind="item.id" selected.bind="item.id == model.selectedValue">${item.name}</option>
@Thanood
Thanood / app.html
Created October 5, 2016 09:04
Aurelia - Materialize Select issue #292 - selectedValue 0.17.1
<template>
<require from="materialize/dist/css/materialize.css"></require>
<select md-select="label: Label" value.two-way="model.selectedValue">
<option repeat.for="item of model.items" model.bind="item.someId">${item.name}</option>
</select>
<div>
selected: ${model.selectedValue}
</div>
</template>
@Thanood
Thanood / app.html
Created October 5, 2016 10:10
Aurelia-Materialize collapsible compose
<template>
<require from="materialize/dist/css/materialize.css"></require>
<ul md-collapsible="accordion: true;">
<template repeat.for="model of elements">
<compose containerless view-model="testModel" model.bind="model"></compose>
</template>
</ul>
</template>
@Thanood
Thanood / app.html
Created October 5, 2016 11:22
Aurelia-Materialize bridge select
<template>
<require from="materialize/dist/css/materialize.css"></require>
<div class="input-field col s12">
<select md-select ref="option" value.bind="optionSelect">
<option value="" disabled selected>Choose your option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
<label>Materialize Select</label>
@Thanood
Thanood / app.html
Created October 5, 2016 11:33
Aurelia-Materialize select (no bridge)
<template>
<require from="materialize/dist/css/materialize.css"></require>
<div class="input-field col s12">
<select ref="option" value.bind="optionSelect">
<option value="" disabled selected>Choose your option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
<label>Materialize Select</label>
@Thanood
Thanood / flatpickr.d.ts
Last active October 17, 2016 13:10
Flatpicker custom attribute
// https://github.com/Microsoft/TypeScript/issues/5073
declare module 'flatpickr' {
class Flatpickr {
constructor(element: Element, options?: any);
destroy();
}
namespace Flatpickr {}
export = Flatpickr;
}
@Thanood
Thanood / app.html
Last active October 23, 2016 12:27
Aurelia-Materialize bridge select service api mock
<template>
<require from="materialize/dist/css/materialize.css"></require>
<div>
<select multiple md-select="disabled.bind: isBusy;" md-select.ref="select" value.two-way="selectedMeal">
<option disabled>Select your meal</option>
<option repeat.for="meal of food" model.bind="meal">${meal.name}</option>
</select>
<md-progress md-type="circular" md-size="small" show.bind="isBusy"></md-progress>
<p>