mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] app: add templates in app config
Also, improve the parsing code
This commit is contained in:
committed by
Lucas Perais - lpe@odoo
parent
536d9e1762
commit
4a4b1fbba5
@@ -15,6 +15,7 @@ export interface AppConfig {
|
||||
env?: Env;
|
||||
translatableAttributes?: string[];
|
||||
translateFn?: (s: string) => string;
|
||||
templates?: string | Document;
|
||||
}
|
||||
|
||||
export const DEV_MSG = `Owl is running in 'dev' mode.
|
||||
@@ -49,6 +50,9 @@ export class App<T extends typeof Component = any> extends TemplateSet {
|
||||
if (config.translatableAttributes) {
|
||||
this.translatableAttributes = config.translatableAttributes;
|
||||
}
|
||||
if (config.templates) {
|
||||
this.addTemplates(config.templates);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user