Skip to content

Commit bbff2d1

Browse files
committed
documentation
1 parent 662c422 commit bbff2d1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,16 @@ In your views, you can now use the x-query-string directive.
4141

4242
```html
4343
<div x-data="{ selected: 'option' }" x-query-string.param="selected">
44-
<!-- -->
44+
<!-- When `selected` changes ?param=value will be appended to the url -->
45+
<!-- Visiting this page with ?param=value will set `selected` to `value` -->
46+
</div>
47+
```
48+
49+
When the first modifier is not set the parameter name will default to the name of the property
50+
51+
```html
52+
<div x-data="{ selected: 'option' }" x-query-string="selected">
53+
<!-- ?selected=value will be appended to the url -->
4554
</div>
4655
```
4756

0 commit comments

Comments
 (0)