Skip to content

Instantly share code, notes, and snippets.

@3cp
3cp / app.html
Last active June 20, 2018 05:10
Aurelia router test
<template>
<router-view></router-view>
</template>
@3cp
3cp / app.css
Last active July 11, 2018 01:07
router binding bug
ul {
background-color: green;
}
@3cp
3cp / app.html
Created July 15, 2018 23:30
repeat.for keep state
<template>
<require from="./child"></require>
<button click.trigger="sort()">Sort</button>
<child repeat.for="child of children" child.bind="child"></child>
</template>
@3cp
3cp / app.html
Last active July 22, 2018 09:15
new router regression
<template>
<a
repeat.for="row of router.navigation"
href.bind="row.href"
css="margin: 1rem; font-weight: ${row.isActive ? 'bold' : 'normal'}"
>${row.title}</a>
<br>
<router-view></router-view>
</template>
@3cp
3cp / index.html
Last active February 26, 2020 00:34
Triple click event
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app="main">
<h1>Loading...</h1>
<script src="/dist/entry-bundle.js" data-main="aurelia-bootstrapper"></script>
</body>
@3cp
3cp / app.html
Last active December 7, 2018 01:51
html relative id bug
<template>
<a
repeat.for="row of router.navigation"
href.bind="row.href"
css="margin: 1rem; font-weight: ${row.isActive ? 'bold' : 'normal'}"
>${row.title}</a>
<br>
<router-view></router-view>
</template>
@3cp
3cp / index.html
Last active January 27, 2020 23:26
An Aurelia SPA!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dumber Gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<base href="/">
</head>
<!--
Dumber gist uses dumber bundler, the default bundle file
@3cp
3cp / index.html
Last active March 5, 2020 00:22
Copied a simple demo from the homepage of stackblitz.com
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dumber Gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
</head>
<!--
Dumber Gist uses dumber bundler, the default bundle file
is /dist/entry-bundle.js.
@3cp
3cp / index.html
Last active January 28, 2020 02:26
au1 with routes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dumber Gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<base href="/">
</head>
<!--
Dumber gist uses dumber bundler, the default bundle file
@3cp
3cp / index.html
Last active March 5, 2020 03:02
Preact with routes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dumber Gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<!--<base href="/">-->
</head>
<body>
<div id="app"></div>