The 'PhoneNumberOutput' component is not using a handler component

Use the below code

Component Code:

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

Controller Code:

answer : function(component, event, helper) {
var text = event.getParam("phone");
        component.set("v.number", text);


No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit