mirror of
https://github.com/django-components/django-components.git
synced 2025-08-04 06:18:17 +00:00
docs: update docs on slots (#1208)
This commit is contained in:
parent
e054a68715
commit
223fc2c68c
5 changed files with 859 additions and 521 deletions
|
@ -189,7 +189,8 @@ which is NOT the same as the `date` variable used inside Calendar's template.
|
|||
|
||||
We want to use the same `date` variable that's used inside Calendar's template.
|
||||
|
||||
Luckily, django-components allows passing data to the slot, also known as [Scoped slots](../../concepts/fundamentals/slots#scoped-slots).
|
||||
Luckily, django-components allows [passing data to slots](../../concepts/fundamentals/slots#slot-data),
|
||||
also known as [Scoped slots](https://vuejs.org/guide/components/slots#scoped-slots).
|
||||
|
||||
This consists of two steps:
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ and render the component inside a template:
|
|||
|
||||
!!! info
|
||||
|
||||
Component tags should end with `/` if they do not contain any [Slot fills](../../concepts/fundamentals/slots#slot-fills).
|
||||
Component tags should end with `/` if they do not contain any [Slot fills](../../concepts/fundamentals/slots).
|
||||
But you can also use `{% endcomponent %}` instead:
|
||||
|
||||
```htmldjango
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue