From 91607387b1c6cbe9e7a9bfe6d11d1730681dfe60 Mon Sep 17 00:00:00 2001 From: pelonpelon Date: Wed, 4 Mar 2015 20:25:47 -0600 Subject: [PATCH 1/4] Update mithril.request.md --- docs/mithril.request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mithril.request.md b/docs/mithril.request.md index 1f45ccdb..94cc3c1b 100644 --- a/docs/mithril.request.md +++ b/docs/mithril.request.md @@ -167,7 +167,7 @@ var log = function(value) { } var users = m.request({method: "GET", url: "/user"}) - .then(log); + .then(log) .then(function(users) { //add one more user to the response return users.concat({name: "Jane"}) From bb4f92d50016e0511fa4dd06122fb81ff65faad9 Mon Sep 17 00:00:00 2001 From: pelonpelon Date: Wed, 4 Mar 2015 20:31:32 -0600 Subject: [PATCH 2/4] Update mithril.module.md --- docs/mithril.module.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/mithril.module.md b/docs/mithril.module.md index f96e7720..dcc59168 100644 --- a/docs/mithril.module.md +++ b/docs/mithril.module.md @@ -100,7 +100,7 @@ m.module(document, module1); var module2 = {}; module2.controller = function() {}; -module1.view = function() {}; +module2.view = function() {}; m.module(document, module2); // logs "unloading module 1" ``` @@ -161,4 +161,4 @@ where: - **returns Object controllerInstance** - An instance of the controller constructor \ No newline at end of file + An instance of the controller constructor From fdfac86f6160977d213c1a9c38c92aa4ff9efb3a Mon Sep 17 00:00:00 2001 From: pelonpelon Date: Wed, 4 Mar 2015 21:02:37 -0600 Subject: [PATCH 3/4] Update mithril.request.md --- docs/mithril.request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mithril.request.md b/docs/mithril.request.md index 94cc3c1b..7e97c4e0 100644 --- a/docs/mithril.request.md +++ b/docs/mithril.request.md @@ -337,7 +337,7 @@ You can read more about the [promise exception monitor here](mithril.deferred.md The `config` option can be used to arbitrarily configure the native XMLHttpRequest instance and to access properties that would not be accessible otherwise. -The example below show how to configure a request where the server expects requests to have a `Content-Type: application/json` header +The example below shows how to configure a request where the server expects requests to have a `Content-Type: application/json` header ```javascript var xhrConfig = function(xhr) { From 1485a24e49aaaf5e3cac46db3ea8d317cf4f2365 Mon Sep 17 00:00:00 2001 From: pelonpelon Date: Wed, 4 Mar 2015 21:54:16 -0600 Subject: [PATCH 4/4] Update mithril.route.md --- 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 d3fede4f..85fd34e1 100644 --- a/docs/mithril.route.md +++ b/docs/mithril.route.md @@ -78,7 +78,7 @@ This redirects to the URL `http://server/#/dashboard/johndoe` and yields: Above, `dashboard` is a module. It contains a `controller` and a `view` properties. When the URL matches a route, the respective module's controller is instantiated and passed as a parameter to the view. -In this case, since there's only route, the app redirects to the default route `"/dashboard/johndoe"`. +In this case, since there's only one route, the app redirects to the default route `"/dashboard/johndoe"`. The string `johndoe` is bound to the `:userID` parameter, which can be retrieved programmatically in the controller via `m.route.param("userID")`.