Angular directive to simulate click to edit functionality