mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Support lower-case-dashed component declaration in the XML added
This commit is contained in:
@@ -35,6 +35,9 @@ export function getComponentModule(elementName: string, namespace: string, attri
|
||||
var instanceModule: Object;
|
||||
var componentModule: definition.ComponentModule;
|
||||
|
||||
// Support lower-case-dashed component declaration in the XML (https://github.com/NativeScript/NativeScript/issues/309).
|
||||
elementName = elementName.split("-").map(s => { return s[0].toUpperCase() + s.substring(1) }).join("");
|
||||
|
||||
// Get module id.
|
||||
var moduleId = MODULES[elementName] || UI_PATH +
|
||||
(elementName.toLowerCase().indexOf("layout") !== -1 ? "layouts/" : "") +
|
||||
|
||||
Reference in New Issue
Block a user