From b58d772cb9fde1d345b46fa58d9b316669f8b045 Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Sat, 2 May 2015 22:55:10 +0900 Subject: [PATCH] Update mithril.route.md Fix sample code minor comment bug. --- docs/mithril.route.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mithril.route.md b/docs/mithril.route.md index 87715abc..f46e3034 100644 --- a/docs/mithril.route.md +++ b/docs/mithril.route.md @@ -164,7 +164,7 @@ m.route(document.body, "/", { }); //re-route to dashboard -m.route("/dashboard"); // logs "unloading home" +m.route("/dashboard"); // logs "unloading home component" ``` This mechanism is useful to clear timers and unsubscribe event handlers. If you have a hierarchy of components, you can recursively call `onunload` on all the components in the tree or use a [pubsub](http://microjs.com/#pubsub) library to unload specific components on demand.