yodalr yodalr - 1 year ago 149
AngularJS Question

AngularJS: Error: event is undefined (Firefox only)

Even though I'm defining the event and it works in Chrome it does not work in Firefox?

app.controller('lightbox_close_controller', ['$scope', '$rootScope', function($scope, $rootScope) {

$scope.close_rating_lightbox = function(event) {

if (!$(".lightbox").hasClass("mobile_ratebox")) {


Answer Source

Pass $event from ui


<button ng-click="close_rating_lightbox($event)">Click Me</button>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download