You need to sign in to do that
Don't have an account?
Lukesh Karmore
i have an issue with aura:method
i have a little problem , i wrote an aura:method in child component and while writing parent component controller what should i write aura:method name or its action name...
hope u understand what i mean...thank u
my code is..
child component:
<aura:component controller="AccountDetails" >
<aura:method name="sampleMethod" action="{!c.doAction}"
description="method shows Account Details">
<aura:attribute name="param1" type="String" default="account"/>
<aura:attribute name="param2" type="Object" />
</aura:method>
</aura:component>
parent component:
callAuraMethod : function(component, event, helper) {
var Childcmp = component.find("c.child");
Childcmp.sampleMethod(function(result){
component.set("v.AccountList",result)
});
}
})
simply my issue is in parent component controller ..... Childcmp.sampleMethod(function(result)
OR Childcmp.doAction(function(result)
thank you
hope u understand what i mean...thank u
my code is..
child component:
<aura:component controller="AccountDetails" >
<aura:method name="sampleMethod" action="{!c.doAction}"
description="method shows Account Details">
<aura:attribute name="param1" type="String" default="account"/>
<aura:attribute name="param2" type="Object" />
</aura:method>
</aura:component>
parent component:
callAuraMethod : function(component, event, helper) {
var Childcmp = component.find("c.child");
Childcmp.sampleMethod(function(result){
component.set("v.AccountList",result)
});
}
})
simply my issue is in parent component controller ..... Childcmp.sampleMethod(function(result)
OR Childcmp.doAction(function(result)
thank you
ChildCmp.cmp
ChildCmpController.js
ParentCmp.cmp
ParentCmpController.js