Added anchor directive to prevent navigation when the anchor is empty.

Feedback on the naming would be good. Not sure of the conventions.