improve demo app

This commit is contained in:
Géry Debongnie
2019-03-18 14:34:35 +01:00
parent 65a65bd241
commit 1f602512a5
6 changed files with 41 additions and 16 deletions
+6 -3
View File
@@ -1,10 +1,13 @@
import { App } from "./app.js";
import { Counter } from "./counter.js";
document.addEventListener("DOMContentLoaded", function() {
function createApp(el) {
const env = {
qweb: new odoo.core.QWeb()
};
const app = new App(env, { initialState: 13 });
app.mount(document.body);
app.mount(el);
}
document.addEventListener("DOMContentLoaded", function() {
createApp(document.body);
});