added angular controller for the events