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
sfdcDeveloper 12sfdcDeveloper 12 

Handling Events with Client-Side Controllers not completed

I am getting below error 
"Challenge Not yet complete... here's what's wrong: 
The 'PhoneNumberInput' client-side controller is not setting the phone param"

Below is my code:
<aura:component >
    <aura:attribute name="number" type="String" default="No Phone Number"/>
    <ui:outputText aura:id="phone" value="{!v.number}"/>
    <aura:handler event="c:PhoneNumberEvent" action="{!c.answer}"/>

<aura:component >
    <ui:inputPhone aura:id="phone" label="phone" />
    <aura:registerEvent name="phone" type="c:PhoneNumberEvent"/>
    <ui:button label="Show Phone" />
<aura:event type="APPLICATION" description="Event template">
    <aura:attribute name="phone" type="String"/>
<aura:application >
    <c:PhoneNumberInput />
    <c:PhoneNumberOutput />

Thanks in advance for help

James LoghryJames Loghry
Not sure if it's written out very well in the challenge, but your "Show Phone" button needs to call a controller method, that fires your PhoneNumberEvent.  When you fire the event, make sure to pass in the phone as a parameter.  You'll also need to make sure that your output component reads the parameter from the event (again, in a controller), and then sets the number attribute based on that.

Hope that helps.