diff --git a/README.md b/README.md
index 3cdad433..ec8499c2 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ class Counter extends owl.Component {
}
class App extends owl.Component {
- static components = { Counter };
+ static components = { Counter };
}
const qweb = new owl.QWeb(TEMPLATES);
@@ -69,7 +69,7 @@ requirements are common and code needs to be maintained by large teams.
it is not ok to use standard web tools based on `npm`.
Owl is not designed to be fast nor small (even though it is quite good on those
-two topics). It is a no nonsense framework to build applications. There is only
+two topics). It is a no nonsense framework to build applications. There is only
one way to define components (with classes).
If you are interested in a comparison with React or Vue, you will
diff --git a/doc/comparison.md b/doc/comparison.md
index c247565e..1cee3115 100644
--- a/doc/comparison.md
+++ b/doc/comparison.md
@@ -31,11 +31,11 @@ than React and Vue. Also, jQuery is not the same kind of framework, but it is in
## Class Based
-Both React and Vue moved away from defining components with classes. They prefer
+Both React and Vue moved away from defining components with classes. They prefer
a more functional approach, in particular, with the new `hooks` mechanisms.
-This has some advantages and disadvantages. But the end result is that React
-and Vue both offers multiple different ways of defining new components. In
+This has some advantages and disadvantages. But the end result is that React
+and Vue both offers multiple different ways of defining new components. In
contrast, Owl has only one mechanism: class-based components. We believe that Owl
components are fast enough for all our usecases, and making it as simple as
possible for developers is more valuable (for us).
@@ -233,4 +233,4 @@ class Counter extends owl.ConnectedComponent {
}
const counter = new Counter({ store, qweb });
-```
\ No newline at end of file
+```
diff --git a/doc/component.md b/doc/component.md
index 77c6c3cd..1746b2dd 100644
--- a/doc/component.md
+++ b/doc/component.md
@@ -119,7 +119,7 @@ find a template with the component name (or one of its ancestor).
```js
class ParentComponent extends owl.Component {
- static components = { SubComponent };
+ static components = { SubComponent };
}
```
@@ -471,7 +471,8 @@ the sub component will also be updated automatically.
Note that there are some restrictions on prop names: `class`, `style` and any
string which starts with `t-` are not allowed.
-The `t-component` directive can also be used to accept dynamic values with string interpolation (like the [`t-attf-`](qweb.md#dynamic-attributes) directive):
+It is not common, but sometimes we need a dynamic component name and/or dynamic props. In this case,
+the `t-component` directive can also be used to accept dynamic values with string interpolation (like the [`t-attf-`](qweb.md#dynamic-attributes) directive):
```xml
@@ -486,6 +487,21 @@ class ParentComponent {
}
```
+And the `t-props` directive can be used to specify totally dynamic props:
+
+```xml
+
+
+
+```
+
+```js
+class ParentComponent {
+ static components = { Child };
+ some = { obj: { a: 1, b: 2 } };
+}
+```
+
**CSS and style:** there is some specific support to allow the parent to declare
additional css classes or style for the sub component: css declared in `class`, `style`, `t-att-class` or `t-att-style` will be added to the
root component element.
diff --git a/doc/qweb.md b/doc/qweb.md
index 9e0787dc..b9f5650a 100644
--- a/doc/qweb.md
+++ b/doc/qweb.md
@@ -65,16 +65,16 @@ We present here a list of all standard QWeb directives:
The component system in Owl requires additional directives, to express various
needs. Here is a list of all Owl specific directives:
-| Name | Description |
-| ------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `t-component`, `t-keepalive`, `t-asyncroot` | [Defining a sub component](component.md#composition) |
-| `t-ref` | [Setting a reference to a dom node or a sub component](component.md#references) |
-| `t-key` | [Defining a key (to help virtual dom reconciliation)](component.md#t-key-directive) |
-| `t-on-*` | [Event handling](component.md#event-handling) |
-| `t-transition` | [Defining an animation](animations.md#css-transitions) |
-| `t-mounted` | [Callback when a node or component is mounted](component.md#t-mounted-directive) |
-| `t-slot` | [Rendering a slot](component.md#slots) |
-| `t-model` | [Form input bindings](component.md#form-input-bindings) |
+| Name | Description |
+| ------------------------------------------------------ | ----------------------------------------------------------------------------------- |
+| `t-component`, `t-props`, `t-keepalive`, `t-asyncroot` | [Defining a sub component](component.md#composition) |
+| `t-ref` | [Setting a reference to a dom node or a sub component](component.md#references) |
+| `t-key` | [Defining a key (to help virtual dom reconciliation)](component.md#t-key-directive) |
+| `t-on-*` | [Event handling](component.md#event-handling) |
+| `t-transition` | [Defining an animation](animations.md#css-transitions) |
+| `t-mounted` | [Callback when a node or component is mounted](component.md#t-mounted-directive) |
+| `t-slot` | [Rendering a slot](component.md#slots) |
+| `t-model` | [Form input bindings](component.md#form-input-bindings) |
## QWeb Engine
@@ -101,7 +101,7 @@ It's API is quite simple:
qweb.addTemplate("mytemplate", "
hello
");
```
- If the optional `allowDuplicate` is set to `true`, then `QWeb` will simply return whenever a template is added for a second time. Otherwise, `QWeb` will crash.
+ If the optional `allowDuplicate` is set to `true`, then `QWeb` will simply return whenever a template is added for a second time. Otherwise, `QWeb` will crash.
- **`addTemplates(xmlStr)`**: add a list of templates (identified by `t-name`
attribute).
diff --git a/doc/readme.md b/doc/readme.md
index 5440caee..3e189226 100644
--- a/doc/readme.md
+++ b/doc/readme.md
@@ -3,7 +3,7 @@
## Owl Content
Owl is a javascript library that contains some core classes and function to help
-build applications. Here is a complete representation of its content:
+build applications. Here is a complete representation of its content:
```
owl
@@ -46,4 +46,4 @@ owl
- [Comparison with React/Vue](comparison.md)
- [Tooling](tooling.md)
-- [Templates to start Owl applications (external link)](https://github.com/ged-odoo/owl-templates)
\ No newline at end of file
+- [Templates to start Owl applications (external link)](https://github.com/ged-odoo/owl-templates)
diff --git a/doc/router.md b/doc/router.md
index 142eb53b..e9202a71 100644
--- a/doc/router.md
+++ b/doc/router.md
@@ -125,7 +125,7 @@ The router also has a `navigate` method, useful to programmatically change the
application to another state (and the url):
```js
-router.navigate({to: 'USER', params: {id: 51}});
+router.navigate({ to: "USER", params: { id: 51 } });
```
### Navigation Guards
@@ -160,7 +160,6 @@ to the currently active route (if any):
```
-
### `Link`
The `Link` component is a Owl component which render as a `