Expose configurable attributes property when loading components

This commit is contained in:
Akash Agrawal
2016-04-28 18:35:55 +05:30
parent 2d4c4c63bb
commit c2f084224a
8 changed files with 16 additions and 13 deletions

View File

@ -154,7 +154,7 @@ export function getComponentModule(elementName: string, namespace: string, attri
return componentModule;
}
export function setPropertyValue(instance: View, instanceModule: Object, exports: Object, propertyName: string, propertyValue: string) {
export function setPropertyValue(instance: View, instanceModule: Object, exports: Object, propertyName: string, propertyValue: any) {
// Note: instanceModule can be null if we are loading custom compnenet with no code-behind.
if (isBinding(propertyValue) && instance.bind) {
@ -183,7 +183,7 @@ export function setPropertyValue(instance: View, instanceModule: Object, exports
if (!attrHandled && (<any>instance)._applyXmlAttribute) {
attrHandled = (<any>instance)._applyXmlAttribute(propertyName, propertyValue);
}
if (!attrHandled) {
if (!attrHandled) {
instance[propertyName] = convertString(propertyValue);
}
}
@ -193,7 +193,7 @@ function getBindingExpressionFromAttribute(value: string): string {
return value.replace("{{", "").replace("}}", "").trim();
}
function isBinding(value: string): boolean {
function isBinding(value: any): boolean {
var isBinding;
if (isString(value)) {