Skip to content

Instantly share code, notes, and snippets.

@opcodewriter
opcodewriter / SvgImage,cs
Last active August 5, 2016 08:38
NControl.SvgImage fix
/// <summary>
/// Svg image.
/// </summary>
public class SvgImage : NControlView
{
#region Private Members
/// <summary>
/// The svg graphics.
/// </summary>
@opcodewriter
opcodewriter / app.html
Last active April 30, 2016 09:36
Aurelia parent vm in child vm
<template>
<require from="./parent"></require>
<parent name='a'></parent>
<parent name='b'></parent>
<parent></parent>
</template>
@opcodewriter
opcodewriter / app.html
Last active April 12, 2016 16:01
Aurelia If Bind test on <content>
<template>
<require from="./parent"></require>
<parent></parent>
</template>
@opcodewriter
opcodewriter / app.html
Last active March 15, 2016 08:54
Aurelia If Bind test on <content>
<template>
<require from="./click-to-edit"></require>
<click-to-edit>
This text node is in DOM only until after click
</click-to-edit>
</template>
@opcodewriter
opcodewriter / app.html
Last active March 16, 2016 14:16 — forked from jdanyow/app.html
Aurelia If Bind test on template part
<template>
<require from="./click-to-edit"></require>
<click-to-edit>
<template replace-part='item-template'>
This text node is in DOM only after click
</template>
</click-to-edit>
</template>
@opcodewriter
opcodewriter / app.html
Last active March 11, 2016 08:37
Aurelia Binding Bug
<template>
<a href="#!" click.delegate="selectUser(user.id)" class="collection-item ${user.state}" repeat.for="user of users" id="user-${user.id}">
<span if.bind="!user.lastName">${user}</span>
<span if.bind="user.firstName">${user.lastName}, ${user.firstName}</span>
</a>
</template>
@opcodewriter
opcodewriter / app.html
Last active May 5, 2017 08:47
Aurelia example
<template>
<a href="#!" click.delegate="selectUser(user.id)" class="collection-item ${user.state}" repeat.for="user of users" id="user-${user.id}">
<span if.bind="!user.lastName">${user}</span>
<span if.bind="user.firstName">${user.lastName}, ${user.firstName}</span>
</a>
</template>
@opcodewriter
opcodewriter / app.html
Created March 9, 2016 21:50
Aurelia example
<template>
<a href="#!" click.delegate="selectUser(user.id)" class="collection-item ${user.state}" repeat.for="user of users" id="user-${user.id}">
<span if.bind="!user.lastName">${user}</span>
<span if.bind="user.firstName">${user.lastName}, ${user.firstName}</span>
</a>
</template>
@opcodewriter
opcodewriter / app.html
Last active March 9, 2016 11:04
Aurelia ContentControl
<template>
<require from="./contentControl.html"></require>
<require from="./myCustomComponent"></require>
<content-control content-template='myCustomTemplate.html' content='this is content rendered with myCustomTemplate'></content-control>
<!-- set a template of a another component-->
<!--<content-control content-template='myCustomComponent' content='this doesnt matter'></content-control> -->
<!-- set actual content with an instance of another component-->
@opcodewriter
opcodewriter / app.html
Last active March 9, 2016 11:47
Aurelia List
<template>
<require from="./list-view"></require>
<list-view items.bind='users'></list-view>
</template>