This creates a simple directive in angualr js that binds an event to the enter key on an element