Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
askonomm committed Nov 5, 2024
1 parent c60c71e commit 5f49aa5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ The `partial` key has to be inside the Data dictionary, and it has to be a strin

The partial will inherit the data dictionary that the parent template has, so you can use the same data in the partial as you can in the parent template.

Inner partials also support interpolated expressions, so you can get partials dynamically, like so:

```html
<div x:inner-partial="{partial}"></div>
```

Where `partial` is a key in the Data dictionary that contains a string with a valid Htmt template.

### `x:outer-partial`

Sets the outer HTML of the element to the value of the attribute, which is a partial template.
Expand All @@ -170,6 +178,14 @@ The `partial` key has to be inside the Data dictionary, and it has to be a strin

The partial will inherit the data dictionary that the parent template has, so you can use the same data in the partial as you can in the parent template.

Outer partials also support interpolated expressions, so you can get partials dynamically, like so:

```html
<div x:outer-partial="{partial}"></div>
```

Where `partial` is a key in the Data dictionary that contains a string with a valid Htmt template.

### `x:if`

Removes the element if the attribute is falsey.
Expand Down

0 comments on commit 5f49aa5

Please sign in to comment.