Skip to content

Instantly share code, notes, and snippets.

@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
Kernel.class_eval do
#FIXME this is terrible
def static(meth)
define_singleton_method(meth) do |*args, &b|
new.send meth, *args, &b
end
meth
end
def abstract(meth)

Guide to loading/error events and substates

In addition to the techniques described in the Asynchronous Routing Guide, the Ember Router provides powerful yet overridable conventions for customizing asynchronous transitions between routes by making use of error and loading substates.

loading substates