remove event listener when directive is destroyed.