Skip to content

Instantly share code, notes, and snippets.

View orbitbot's full-sized avatar

Patrik Johnson orbitbot

  • Helsinki, Finland
View GitHub Profile
@orbitbot
orbitbot / breadcrumbs.js
Created August 4, 2016 15:01 — forked from WreckedAvent/breadcrumbs.js
basic data flow example
import * as m from 'mithril'
// this is a "presentation" component and knows nothing about the world
export const view = (_, { link }) => m('.nav', m('.breadcrumbs', [
m('a', { href: link })
]))
@orbitbot
orbitbot / app.js
Created October 31, 2015 10:20 — forked from ilsenem/app.js
Mithril Dependency Injector #.editorconfig
// Example
// app.js
document.addEventListener("DOMContentLoaded", function (e) {
m.route.mode = "hash";
m.route(document.getElementById("application"), "/", {
"/": m.resolve("pages.home"),
"/findus": m.resolve("pages.findus")
});
});