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
vijayabhaskarareddyvijayabhaskarareddy 

what is my mistake in controller, i am getting error .This page has an error.( You might just need to refresh it. Unknown controller action 'doInit' Failing descriptor: {markup://c:test2}

<aura:component>
    <aura:attribute name="setMeOnInit" type="String" default="default value" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    
    <p>This value is set in the controller after the component initializes and before rendering.</p>
    <p><b>{!v.setMeOnInit}</b></p>
    
</aura:component>
================================
<aura:application >
    <c:test2/>
</aura:application>
=============================
({
    doInit: function(cmp) {
        // Set the attribute value. 
        // You could also fire an event here instead.
        cmp.set("v.setMeOnInit", "controller init magic!");
    }
   
})

 
Best Answer chosen by vijayabhaskarareddy
Sukanya BanekarSukanya Banekar
Hi,
I have cloned your code in my org and it is working properly.
User-added image