Created a factory to hold the event. I believe that was the issue causing a variable to be undefined.