mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] template set config: getTemplate function
A template set can now obtain a template by calling the function getTemplate (if any) received in the initial config. The returned value can be an Element instance, a template string, a function (i.e. a compiled template), or null. In the last case, owl will look into the template set rawTemplates object.
This commit is contained in:
committed by
Sam Degueldre
parent
70101e4c66
commit
7b454dae66
@@ -61,6 +61,8 @@ The `config` object is an object with some of the following keys:
|
||||
templates (see [translations](translations.md))
|
||||
- **`templates (string | xml document)`**: all the templates that will be used by
|
||||
the components created by the application.
|
||||
- **`getTemplate ((s: string) => Element | Function | string | void)`**: a function that will be called by owl when it
|
||||
needs a template. If undefined is returned, owl looks into the app templates.
|
||||
- **`warnIfNoStaticProps (boolean, default=false)`**: if true, Owl will log a warning
|
||||
whenever it encounters a component that does not provide a [static props description](props.md#props-validation).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user