mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] components: add test for template string in props
This commit is contained in:
committed by
Aaron Bohy
parent
4866ed8e8a
commit
2943ca3921
+2
-2
@@ -5,9 +5,9 @@ import { globalTemplates } from "./app/template_set";
|
||||
// Global templates
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
export function xml(strings: TemplateStringsArray, ...args: any[]) {
|
||||
export function xml(...args: Parameters<typeof String.raw>) {
|
||||
const name = `__template__${xml.nextId++}`;
|
||||
const value = String.raw(strings, ...args);
|
||||
const value = String.raw(...args);
|
||||
globalTemplates[name] = value;
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user