I have this event in my base.cmp
:
ResourcesLoaded.evt
<aura:event type="COMPONENT" access='global'>
</aura:event>
In my component I define the event like that:
<aura:registerEvent name='ResourcesLoaded' type='c:ResourcesLoaded' access='global' />
And I add an handler like that:
<aura:handler name="ResourcesLoaded" event="c:ResourcesLoaded" action="{!c.initializeComponent}"/>
I fire the ResourcesLoaded
event after my scripts are loaded.
If I execute that, everything is fine and works correctly. But now, when I create another component and embedded my base.cmp
and hooks myself on the ResourcesLoaded
element like this:
<c:Base ResourcesLoaded="{!c.theThingsIHaveToDoWhenIamLoaded}" />
The initializeComponent
is never called. From the documentation, I think it should call both my theThingsIHaveToDoWhenIamLoaded
and initializeComponent
methods.
Is that a bug? I think it should be supported by lightning.