Skip to content

Commit

Permalink
Minor corrections to docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrempel committed Jun 19, 2016
1 parent b6f0ced commit 8e5486e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# elm-route-url

This is a module for routing single-page-apps in Elm, building on the
[navigation](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
package. It is the successor to elm-route-hash,
[`elm-lang/navigation`](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
package. It is the successor to elm-route-hash:

* now compatible with Elm 0.17, and

Expand All @@ -22,9 +22,9 @@ So, there are two things going on here:
* Mapping changes in our app's state to changes in the browser's location.
* Mapping changes in the browser's location to changes in our app's state.

Now, you can already arrange for these things to happen using the official
[navigation](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
package. Furthermore, there are already a wealth of complementary packages,
Now, you can already arrange for these things to happen using
[`elm-lang/navigation`](http://package.elm-lang.org/packages/elm-lang/navigation/latest).
Furthermore, there are already a wealth of complementary packages,
such as:

* [evancz/url-parser](http://package.elm-lang.org/packages/evancz/url-parser/latest)
Expand All @@ -40,8 +40,8 @@ So, what does elm-route-url do differently than the others?

### Mapping changes in the app state to a possible location change

If you were using the official [navigation](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
package directly, then you would make changes to the URL with ordinary commands.
If you were using [`elm-lang/navigation`](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
directly, then you would make changes to the URL with ordinary commands.
So, as you write your `update` function, you would possibly return a command,
using [`modifyUrl`](http://package.elm-lang.org/packages/elm-lang/navigation/1.0.0/Navigation#modifyUrl)
or [`newUrl`](http://package.elm-lang.org/packages/elm-lang/navigation/1.0.0/Navigation#newUrl).
Expand Down
12 changes: 6 additions & 6 deletions src/RouteUrl.elm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ changes in the browser's location. The net effect is to make it possible for
the 'back' and 'forward' buttons in the browser to do useful things, and for
the state of your app to be partially bookmark-able.
It is, of course, possible to do something like this using the official
[`Navigation`](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
module by itself, and you might well want to try that. For a discussion of the
It is, of course, possible to do something like this using
[`elm-lang/navigation`](http://package.elm-lang.org/packages/elm-lang/navigation/latest)
by itself. For a discussion of the
differences between the official module and this one, see the [package documentation]
(http://package.elm-lang.org/packages/rgrempel/elm-route-url/latest).
# Configuration
You configure this module by providing the functions set out in [`App`](#App] or
You configure this module by providing the functions set out in [`App`](#App) or
[`AppWithFlags`](#AppWithFlags), depending on what kind of `init` function you
want to use.
Expand Down Expand Up @@ -64,7 +64,7 @@ import Dict
The `init`, `update`, `subscriptions` and `view` fields have the same meaning
as they do in [`Html.App.program`](http://package.elm-lang.org/packages/elm-lang/html/1.0.0/Html-App#program)
... that is, you should provide what you normally provide to that function.
-- that is, you should provide what you normally provide to that function.
So, the "special" fields are the `delta2url` function and the
`location2messages` function.
Expand Down Expand Up @@ -123,7 +123,7 @@ type alias App model msg =
The `init`, `update`, `subscriptions` and `view` fields have the same meaning
as they do in
[`Html.App.programWithFlags`](http://package.elm-lang.org/packages/elm-lang/html/1.0.0/Html-App#program)
... that is, you should provide what you normally provide to that function.
-- that is, you should provide what you normally provide to that function.
So, the special functions are `delta2url` and `location2messages`,
which are described above, under [`App`](#App).
Expand Down
4 changes: 2 additions & 2 deletions src/RouteUrl/Builder.elm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ to build up the URL.
url =
builder
|> newEntry
|> appendPath ["home"]
|> appendToPath ["home"]
-}
builder : Builder
builder =
Expand Down Expand Up @@ -278,7 +278,7 @@ toUrlChange : Builder -> UrlChange
toUrlChange = toChange False


{-| Like `toUrlChange`, but puts everything into the hash, prepended by "#!".
{-| Like [`toUrlChange`](#toUrlChange), but puts everything into the hash, prepended by "#!".
If your `Builder` has a hash component, we'll use '$' instead of '#' to
delimit the embedded hash. And, we will use '^' instead of '?' to begin
Expand Down

0 comments on commit 8e5486e

Please sign in to comment.