delete function for events in direcive + in service