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
ying liu 14ying liu 14 

lightning cannot get parameter in aura:handler name="change"

Dears,
I have two components named 'comp1' and 'comp2' .
'comp1' contains 'comp2' and transfer parameters to 'comp2'. 
There is an event in 'comp2' to handle change. But only one paramter has values output in the function of controller. Both of the parameters should have values.
Below is my code. Please help me about this.
Thank you very much!

comp1:
<aura:component controller="testController">
<aura:attribute name="qa" type="QVM.QA"/>
<div class="qContent">
       <c:comp2 qpa="{!ra.Qpa}" answer="{!ra.answer}" />
 </div> 
</aura:component >

comp2:
<aura:component >
    <aura:attribute name="answer" type="QVM.Answer" />
    
    <aura:attribute name="qpa" type="QVM.QPA" />
    <aura:attribute name="order" type="Integer" />
    <aura:handler name="change" value="{!v.order}" action="{!c.handleChange}"/>
</aura:component >

comp2controller:
handleChange : function(component, event, helper) {
    var answer = component.get("v.answer");
    var qpa = component.get("v.qpa");
console.log(answer);//no vlaues
console.log(qpa);//have values
}