Fixes angular-ui/ui-router#350

Depending on whether the target state has `url` defined or not, either bind `click` event or generate `href`.