Angular directive for handling focus