Skip to content

Instantly share code, notes, and snippets.

View stoffeastrom's full-sized avatar

Christoffer Åström stoffeastrom

View GitHub Profile
export function configure(config) {
return System.import("test/test-container");
}
@stoffeastrom
stoffeastrom / decorator.js
Last active October 30, 2015 09:37
Decorator sample
import {Aurelia} from 'aurelia-framework';
import {Container} from 'aurelia-dependency-injection';
export function toolBarItem() {
return (target)=> {
let container = Container.instance;
let aurelia = container.get(Aurelia);
console.log(aurelia);
}
}
@stoffeastrom
stoffeastrom / app.html
Created August 24, 2016 19:50
Aurelia DBMonster with IntersectionObserver
<template>
<require from="./when-visible"></require>
<div>
<table class="table table-striped latest-data">
<tbody>
<tr repeat.for="db of databases">
<td class="dbname">
${db.dbname & oneTime & whenVisible}
</td>
<td class="query-count">
<template>
<require from="./numeric-input"></require>
<numeric-input value.bind="value" callback.call="onBlur()"></numeric-input>
${value}
</template>
@stoffeastrom
stoffeastrom / webpack.config.js
Created January 5, 2017 21:14
webpack config
module.exports = {
devServer: {
host: '0.0.0.0',
port: 9000
},
entry: {
'app': ['aurelia-bootstrapper-webpack', 'aurelia-polyfills', 'aurelia-pal', 'aurelia-pal-browser', 'bluebird', main]
},
output: {
path: outDir + '/' + pkg.version,
@stoffeastrom
stoffeastrom / app.html
Created January 6, 2017 18:03 — forked from martonsagi/app.html
Inline template in custom aurelia component
<template>
<require from="./inline"></require>
<div class="container-fluid">
<h4 class="page-header">Inline template in custom component</h4>
<div class="form-group">
<label>Template:</label>
<input class="form-control" type="text" value.bind="customTemplate" />
</div>
@stoffeastrom
stoffeastrom / app.html
Last active February 11, 2024 22:27
Aurelia Oribella Sortable Gist Table Rows
<template>
<table oa-sortable="scroll.bind: 'document'; items.bind: items;">
<tbody>
<tr
oa-sortable-item="item.bind: item;"
repeat.for="item of items"
draggable="false">
<td>
${item.text}
</td>
@stoffeastrom
stoffeastrom / app.html
Last active February 11, 2024 22:33
Aurelia Oribella Sortable Gist
<template>
<ul oa-sortable="scroll.bind: 'document'; items.bind: items;">
<li
oa-sortable-item="item.bind: item;"
repeat.for="item of items"
draggable="false">
${item.text}
</li>
</ul>
</template>
@stoffeastrom
stoffeastrom / app.html
Last active February 17, 2017 20:15 — forked from jdanyow/app.html
Aurelia Gist
<template>
<require from="test"></require>
<h1>${message}</h1>
<div test.call="onTest()"></div>
</template>
@stoffeastrom
stoffeastrom / app.html
Last active January 13, 2017 20:01
Aurelia Oribella Sortable Gist New
<template>
<ul oa-sortable="scroll.bind: 'document'; items.bind: items; axis: 'y'">
<li
oa-sortable-item="item.bind: item;"
repeat.for="item of items"
draggable="false">
${item.text}
</li>
</ul>
</template>