I have the following parent component, child component, and static resource:
//ParentComponent
<aura:component extensible="true">
</aura:component>
//ChildComponent
<aura:component extends="c:ParentComponent" implements="flexipage:availableForAllPageTypes">
<ltng:require scripts="{!$Resource.Static_Resource}" afterScriptsLoaded=" {!c.afterScriptsLoaded}"/>
</aura:component>
//ChildComponent Controller
({
afterScriptsLoaded : function(component, event, helper) {
var a = window.myStaticResource;
}
})
//Static Resource
window.myStaticResource = (function() {
var a = 0;
return a;
})();
The static resource loads, and I can see it in my resource list, but the afterScriptsLoaded is never called. However, if I remove the extends="c:ParentComponent"
from the Child Component, the afterScriptsLoaded is called. Is this a bug? Or is it not allowed for some reason?