From 7c55516d5d6874f3a3e22b8e80702d4bd1fd9631 Mon Sep 17 00:00:00 2001 From: glebcha Date: Wed, 6 May 2015 14:00:14 +0500 Subject: [PATCH 1/4] added jsfiddle with extended todo app example --- docs/getting-started.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/getting-started.md b/docs/getting-started.md index dd453245..d32420ca 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -499,6 +499,7 @@ m.mount(document, {controller: todo.controller, view: todo.view}); ``` This example is also available as a [jsFiddle](http://jsfiddle.net/milesmatthias/fbgypzbr/1/). +Theres is also [Extended example](http://jsfiddle.net/glebcha/q7tvLxsa/) available on jsfiddle. --- From 809447ed191b015e4b2e795bf8430ea420a63e8b Mon Sep 17 00:00:00 2001 From: glebcha Date: Thu, 7 May 2015 10:37:34 +0500 Subject: [PATCH 2/4] corrected typo --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index d32420ca..b0f0db02 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -499,7 +499,7 @@ m.mount(document, {controller: todo.controller, view: todo.view}); ``` This example is also available as a [jsFiddle](http://jsfiddle.net/milesmatthias/fbgypzbr/1/). -Theres is also [Extended example](http://jsfiddle.net/glebcha/q7tvLxsa/) available on jsfiddle. +There is also [Extended example](http://jsfiddle.net/glebcha/q7tvLxsa/) available on jsfiddle. --- From 592f31ee3d11d7baf2cdc35857af5268a20d2d21 Mon Sep 17 00:00:00 2001 From: pelonpelon Date: Thu, 7 May 2015 08:51:36 -0500 Subject: [PATCH 3/4] Clarification on m.mount() signature --- docs/mithril.mount.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mithril.mount.md b/docs/mithril.mount.md index 76edfc9f..b742224b 100644 --- a/docs/mithril.mount.md +++ b/docs/mithril.mount.md @@ -62,7 +62,7 @@ where: - **Component component** - A component is supposed to be an Object with two keys: `controller` and `view`. Each of those should point to a Javascript function + A component is supposed to be an Object with two keys: `controller` and `view`. Each of those should point to a Javascript function. If the `controller` is omitted, Mithril will provide one, pointing to an empty function. When `m.mount` is called, the controller function runs, and its return value is returned by the `m.mount` call. From c622283877aecb217d6d02e4582284c8796767ae Mon Sep 17 00:00:00 2001 From: Daniel Loomer Date: Thu, 7 May 2015 15:54:51 -0400 Subject: [PATCH 4/4] components.md 'trigger', not 'broadcast' --- docs/components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components.md b/docs/components.md index 7aca51a9..da76aa66 100644 --- a/docs/components.md +++ b/docs/components.md @@ -432,7 +432,7 @@ var ContactList = { m.mount(document.body, ContactsWidget) ``` -Here we've moved `Contact.save(contact).then(Observable.broadcast("updateContact"))` out of the `ContactForm` component and into the model layer. In its place, `ContactForm` merely emits an action, which is then handled by this model layer observer. +Here we've moved `Contact.save(contact).then(Observable.trigger("updateContact"))` out of the `ContactForm` component and into the model layer. In its place, `ContactForm` merely emits an action, which is then handled by this model layer observer. This allows swapping the implementation of the `saveContact` handler without changing the `ContactForm` component.