You need to sign in to do that
Don't have an account?
vijayabhaskarareddy
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!"); } })
I have cloned your code in my org and it is working properly.