From 13a7754f2b91021e8895b580490339655308d4d6 Mon Sep 17 00:00:00 2001 From: "C. James Winslow" Date: Wed, 10 Sep 2014 16:19:02 -0700 Subject: [PATCH] whitespace fixes --- docs/mithril.module.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/mithril.module.md b/docs/mithril.module.md index d76f76a0..3875ca47 100644 --- a/docs/mithril.module.md +++ b/docs/mithril.module.md @@ -62,13 +62,13 @@ The example below shows a component module called `user` being included in a par var dashboard = { controller: function() { this.greeting = "Hello"; - + this.user = new user.controller(); }, view: function(controller) { return [ m("h1", controller.greeting), - + user.view(controller.user) ]; } @@ -158,7 +158,7 @@ where: - **DOMElement rootElement** A DOM element which will contain the view's template. - + - **Module module** A module is supposed to be an Object with two keys: `controller` and `view`. Each of those should point to a Javascript class constructor function @@ -166,11 +166,11 @@ where: The controller class is instantiated immediately upon calling `m.module`. Once the controller code finishes executing (and this may include waiting for AJAX requests to complete), the view class is instantiated, and the instance of the controller is passed as an argument to the view's constructor. - + Note that controllers can manually instantiate child controllers (since they are simply Javascript constructors), and likewise, views can instantiate child views and manually pass the child controller instances down the the child view constructors. - + This "[turtles all the way down](https://en.wikipedia.org/wiki/Turtles_all_the_way_down)" approach is the heart of Mithril's component system. - + Components are nothing more than decoupled classes that can be dynamically brought together as required. This permits the swapping of implementations at a routing level (for example, if implementing widgetized versions of existing components), and class dependency hierarchies can be structurally organized to provide uniform interfaces (for unit tests, for example).