Add event handler in directive