Compare commits

...

2 Commits

Author SHA1 Message Date
pipu-odoo
0e9457f511 Update 01_components.rst 2023-03-29 14:53:46 +02:00
pipu-odoo
65d67a1250 Update 01_components.rst 2023-03-28 09:12:15 +02:00

View File

@@ -288,6 +288,13 @@ The final touch is to let the user delete a todo.
Owl has a powerful `slot <{OWL_PATH}/doc/reference/slots.md>`_ system to allow you to write generic
components. This is useful to factorize the common layout between different parts of the interface.
Imagine that you want to display some cards with each the title and a description of a film.
Clearly, the parent component needs to *define* a content for each card, and each card need
to *insert* the content given by the parent component. This is done by using the directives
`t-set-slot="slotname"` (to define) and `t-slot="slotname"` (to insert).
.. tip:: The value of the slot has to be inside the slot tag. Don't forget that t-slot="SlotName"
.. exercise::
#. Write a `Card` component using the following Bootstrap HTML structure: