Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
Conponent is

<aura:component >

    <ui:inputText label="name" aura:id="name" placeholder="Enter your name"/>

    <ui:outputText aura:id="nameoutput" value=""/>

    <ui:button aura:id="buttonid" label="Submit" press="{!c.getInput}"/>

</aura:component>

****client side controller is ***

({

    getinput : function(cmp , event) {

        var.fullname = cmp.find("name").get("v.value");

        var.outname = cmp.find("nameoutput");

        outname.set("v.value",fullname+"***");

    }

})

not working properly

error message is****

This page has an error. You might just need to refresh it. Component class instance initialization error [Cannot read property 'apply' of undefined] Failing descriptor: {markup://aura:application}
4 answers
  1. Jun 21, 2017, 10:21 AM
    Hi Chandan,

    Javascript is case sensitive, so in your case - 

    Component Code - 

    <ui:button aura:id="buttonid" label="Submit" press="{!c.getInput}"/>

    Component Controller Code -

     getinput : function(component, event) {}

    Note the method name written in press attribute and in the controller

    Change it to getInput or getinput at both places and it will work fine.

    Hope this helped you.

    Thanks,

    Mustafa Jhabuawala

    Technical Lead at Zen4orce (http://www.zen4orce.com)
Loading
0/9000