work on composability

This commit is contained in:
Géry Debongnie
2019-01-17 12:49:13 +01:00
parent 70881312fa
commit 9b08e30cf3
5 changed files with 56 additions and 8 deletions
+2 -2
View File
@@ -44,6 +44,8 @@ export default class Widget {
async mount(target: HTMLElement) {
await this.willStart();
this.env!.qweb.addTemplate(this.name, this.template);
delete this.template;
await this.render();
target.appendChild(this.el!);
}
@@ -56,8 +58,6 @@ export default class Widget {
setEnvironment(env: Env) {
this.env = Object.create(env);
env.qweb.addTemplate(this.name, this.template);
delete this.template;
}
async updateState(newState: Object) {