function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JAGDISH MOREJAGDISH MORE 

aura:method is not working properly. Parent component is not calling child component?

ParentComponent:-
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global">
    <aura:attribute name="Name" type="String" default="---------------- This is a Parent Message------------" />
    <Canteen:ChildComponent aura:id="childCmp"/>
          <lightning:button variant="brand" label="Call Aura Method"
                          onclick="{!c.callAuraMethod}" />
    <p>"{!v.Name}"</p>
</aura:component>

parentcomponentcontroller:-
({
    callAuraMethod : function(component, event, helper) {
           var childCmp = component.find("childCmp");
            var retnMsg = childCmp.childMethod('Amit');
        component.set("v.Name",retnMsg);
    }
})

Childcomponent:-
<aura:component >
    <aura:method name="childMethod" action="{!c:getMessage}" access="public" description="Child Method">
        <aura:attribute name="Name" type="String" default="Jagdish"/>
    </aura:method>       
    {v.Name}
</aura:component>

Childcomponentcontroller:-
({
    getMessage : function(component, event) {
        var parameter = event.getParam('arguments');
        debugger;
        if(parameter){
            debugger;
            var par1 = params.Name;
            return "##############This is a message returned by the child whith parameter:: "+par1+"##############";
        }
        return "TEST";
    }
})
 Call to child component is not happning? I am not understanding why?