Advanced event system for AngularJS