refacto events with angular