+ 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