Skip to content

Commit

Permalink
docs: clearer examples in routing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
egil authored May 5, 2024
1 parent 6e67bb4 commit 314b860
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ The routing mode is determined by the presence or absence of [htmx headers](http

```
if ( HX-Request is null || ( HX-Boosted is not null && HX-Target is null ) )
RoutingMode.Standard
RoutingMode.Standard
else
RoutingMode.Direct
RoutingMode.Direct
```

Here's a detailed look at each mode:
Expand All @@ -30,7 +30,7 @@ Example:

```
HTTP GET /my-page
App -> Routes --> MainLayout --> MyPage
App --> Routes --> MainLayout --> MyPage
```

## Direct Routing
Expand All @@ -42,8 +42,10 @@ If the target component has a `HtmxLayout` attribute, that layout is rendered fi
Example:

```
HTTP GET /my-htmx-page-with-layout
HtmxLayout --> MyHtmxPageWithHtmxLayout
HTTP GET /my-htmx-page
HtmxLayout --> MyHtmxPage
MyHtmxPage
```

Expand Down

0 comments on commit 314b860

Please sign in to comment.