mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
imp: qweb engine can be initialized with templates
This commit is contained in:
+5
-1
@@ -182,7 +182,7 @@ export class QWeb {
|
||||
templates: { [name: string]: CompiledTemplate<VNode> } = {};
|
||||
directives: Directive[] = [];
|
||||
|
||||
constructor() {
|
||||
constructor(data?: string) {
|
||||
[
|
||||
forEachDirective,
|
||||
escDirective,
|
||||
@@ -196,6 +196,10 @@ export class QWeb {
|
||||
refDirective,
|
||||
widgetDirective
|
||||
].forEach(d => this.addDirective(d));
|
||||
|
||||
if (data) {
|
||||
this.loadTemplates(data);
|
||||
}
|
||||
}
|
||||
|
||||
utils = {
|
||||
|
||||
Reference in New Issue
Block a user