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

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: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>
<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
I have cloned your code in my org and it is working properly.
User-added image