Using client-side QWeb templates

Just as it’s a bad pattern to programmatically create HTML code in controllers, you should create only the minimum amount of DOM elements in your client-side JavaScript code. Fortunately, there’s a templating engine available for the client side too and, even more fortunately, it’s just the same as for server-side code.

We’ll use Qweb to make the module from the Creating custom widgets recipe more modular by moving the DOM element creation to QWeb.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.196.175