emberjs/ember.js — pull request #1849 by rlivsey (2013-01-22 23:58:05+00:00)
Title: If overriding tagName on linkTo helper, generate an inner A tag

This has come up a fair bit on IRC and a [few](http://stackoverflow.com/questions/14328295/how-do-i-bind-to-the-active-class-of-a-link-using-the-new-ember-router) [times](http://stackoverflow.com/questions/14412073/assigning-active-class-to-selected-list-item-in-emberjs/14416595) on StackOverflow but none of the solutions seem particularly nice.

I've modified linkTo to detect if the `tagName` has been given and isn't 'a', then instead of generating invalid HTML (eg `
...
`) then it will use a layout which contains the a tag (eg `
...
`).

I'm not 100% on whether this is the correct implementation, especially if layout is going to go on the outside of the View in future, but hopefully good for some discussion.