[IMP] component: get env from constructor

closes #430
This commit is contained in:
Aaron Bohy
2019-10-31 13:31:10 +01:00
committed by Géry Debongnie
parent 8fbf2172c5
commit 05a678c039
14 changed files with 48 additions and 47 deletions
+2 -2
View File
@@ -95,7 +95,7 @@ function makeCodeIframe(js, css, xml, errorHandler) {
owl.__info__.mode = 'dev';
let templates = \`${sanitizedXML}\`;
const qweb = new owl.QWeb({ templates });
owl.config.env = { qweb };
owl.Component.env = { qweb };
}
${js}`;
script.innerHTML = content;
@@ -443,7 +443,7 @@ async function start() {
owl.utils.whenReady()
]);
const qweb = new owl.QWeb({ templates });
owl.config.env = { qweb };
owl.Component.env = { qweb };
const app = new App();
app.mount(document.body);
}