I am having problems firing an application Event, i do not know what i am messing. Here is my code: APP:
<aura:application extends="force:slds">
<c:QuizWelcomeComponent />
<c:QuizQuestionComponent />
</aura:application>
QuizWelcomeComponent: (should fire an event to QuizQuestionComponent component)
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
<aura:registerEvent name="StartQuiz" type="c:StartQuizEvent"/>
......
......
<button class="slds-button slds-button_brand" onclick="{!c.StartQuiz}">Commencer le Quiz</button>
</aura:component>
controller:
StartQuiz : function(component, event, helper) {
var StartEvent = $A.get("e.c:StartQuiz");
console.log('StartEvent = '+StartEvent);
StartEvent.fire();
}
StartQuizEvent:
<aura:event type="APPLICATION">
</aura:event>
ERROR: console.log('StartEvent = '+StartEvent) from the QuizWelcomeComponent component returns undefined so I do not know what I am doing wrong, I even copied the firing code from the APPLICATION EVENT DOCs.