mirror of
https://github.com/ryannhg/elm-spa.git
synced 2024-11-22 17:52:33 +03:00
Merge pull request #46 from Arkham/fix-typo
Fix small typo in routing guide
This commit is contained in:
commit
aa02e7abe1
@ -53,7 +53,7 @@ __Supported Parameters__: Only `String` and `Int` dynamic parameters are support
|
|||||||
You can also nest your dynamic routes. Here's an example:
|
You can also nest your dynamic routes. Here's an example:
|
||||||
|
|
||||||
|
|
||||||
__`Users/User_String/Posts/Post_Id.elm`__
|
__`Users/User_String/Posts/Post_Int.elm`__
|
||||||
|
|
||||||
URL | Params
|
URL | Params
|
||||||
:-- | :--
|
:-- | :--
|
||||||
@ -75,7 +75,7 @@ type alias Url params =
|
|||||||
|
|
||||||
#### params
|
#### params
|
||||||
|
|
||||||
Each dynamic page has it's own params, pulled from the URL. There are examples in the "Params" column above.
|
Each dynamic page has its own params, pulled from the URL. There are examples in the "Params" column above.
|
||||||
|
|
||||||
```elm
|
```elm
|
||||||
type alias Params =
|
type alias Params =
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Shared
|
# Shared
|
||||||
|
|
||||||
Whether your sharing layouts or information between pages, the `Shared` module is the place to be!
|
Whether you're sharing layouts or information between pages, the `Shared` module is the place to be!
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
If you have initial data you hope to pass into your Elm application, you should provide it via `Flags`,
|
If you have initial data you want to pass into your Elm application, you should provide it via `Flags`.
|
||||||
|
|
||||||
When you create a project with `elm-spa init`, a file will be created at `public/main.js`:
|
When you create a project with `elm-spa init`, a file will be created at `public/main.js`:
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ This is just an example of using `update` with the `user` field we added earlier
|
|||||||
|
|
||||||
## view
|
## view
|
||||||
|
|
||||||
The `Shared.view` function is a great place to render things that should persist across page transitions. It comes with more than just a `Model`, so you can insert the `page` whereever you'd like:
|
The `Shared.view` function is a great place to render things that should persist across page transitions. It comes with more than just a `Model`, so you can insert the `page` wherever you'd like:
|
||||||
|
|
||||||
```elm
|
```elm
|
||||||
import Components.Navbar as Navbar
|
import Components.Navbar as Navbar
|
||||||
|
Loading…
Reference in New Issue
Block a user