Skip to content

Instantly share code, notes, and snippets.

View bigopon's full-sized avatar
💭
Working

bigopon bigopon

💭
Working
View GitHub Profile
@bigopon
bigopon / app.html
Created October 5, 2018 11:47 — forked from Trix3x/app.html
Aurelia Gist
<template>
<h1>${message}</h1>
<compose view="./comp.html"></compose>
</template>
@bigopon
bigopon / app.html
Created August 24, 2018 21:44 — forked from jmezach/app.html
Aurelia Gist
<template>
<router-view></router-view>
<button click.delegate="click()">Replace</button>
</template>
@bigopon
bigopon / app.html
Last active August 1, 2018 11:41
remove svg wrappers
<template>
<require from="./svg-rect"></require>
<svg width="100" height="200" style="background-color:lightblue">
<svg-rect
repeat.for="i of 5"
rect.bind="{x: 5, y: 5 + (i * 25), width: 30, height: 20}"></svg-rect>
</svg>
</template>
@bigopon
bigopon / app.html
Created May 29, 2018 11:49 — forked from gordon-matt/app.html
select init
<template>
<p><strong>OPEN Console window first, to see values when clicking the buttons</strong></p>
<p>What I would like (in some cases, I populate the values myself - generated by ASP.NET Razor HTML helper):</p>
<select value.bind="pageTypeId">
<option value="0bedc229-2280-46fa-b157-bce4f1cddeaa">Standard Page</option>
</select>
<button click.delegate="showValue()">Show Value</button>
<p>This way forces user to select an option:</p>
@bigopon
bigopon / app.html
Last active May 26, 2018 09:52 — forked from itfourp/app.html
Repeater/ViewFactory cache usage issue
<template>
<require from="demo-container"></require>
<h2>Current behaviour</h2>
<h4>Sometimes when swapping elements the template used is not the right one for the repeat</h4>
<button click.delegate="swapElements(bogusAppItems, bogusOtherAppItems)">Swap elements</button>
<demo-container container-items.bind="bogusAppItems">
<template replace-part="item-replaceable">
<span>${containerItem.description}</span>
</template>
@bigopon
bigopon / app.html
Last active April 13, 2018 12:19 — forked from fragsalat/app.html
Binding Behavior binding
<template>
<require from="./lookup"></require>
<h1>${message}</h1>
<button click.delegate="addItem()">Add item ${items.length}</button>
<button click.delegate="removeRandomItem()">Remove random</button>
<div repeat.for="item of items">
Index: ${$index} | Id: ${item.id} >>> ${item.value & lookup:item:'type'}
</div>
</template>
@bigopon
bigopon / 3d-viewer.js
Created April 13, 2018 04:11 — forked from balazsmeszegeto/3d-viewer.js
Aurelia Bug: redirect in child router (navigation strategy), when parent is using navigation strategy
import {inlineView} from 'aurelia-templating';
@inlineView('<template>I\'m a 3D viewer</template>')
export class ViewerViewModel { }
@bigopon
bigopon / app.html
Last active April 9, 2018 13:10 — forked from Alexander-Taran/app.html
Template binding for array
<template>
<input type='file' multiple change.trigger='onSelectFiles($event.target.files)' />
<ul>
<li repeat.for='upload of uploads'>
# ${$index} Time - ${upload.estimateUploadTime} <-> ${(upload.progress / upload.size * 100).toFixed(2)}%
<br/>
<img width=100 height=100 src.bind=upload.url />
<progress min=0 max.bind=upload.size value.bind='upload.progress' ></progress>
</li>
@bigopon
bigopon / app.html
Created April 1, 2018 23:44 — forked from bagl/app.html
Bind custom elements bindable property to a value of custom attribute
<template>
<require from="./my-attribute"></require>
<require from="./my-element"></require>
<my-element val="el1"></my-element><br/>
<!-- i would like to see Value: el2 in the output -->
<my-element my-attribute="el2"></my-element>
</template>
@bigopon
bigopon / app.html
Last active November 29, 2017 04:12 — forked from davismj/app.html
Test: Automatic Number Conversion
<template>
<input type="number" value.bind="value" />
<pre>${log}</pre>
</template>