In my case, I used user-entered links that were turned into rails_autolink anchor tags on the server, so I could not replace the links with ember link-to.
I was able to get around this with a few steps. First, I added the autolink class to all the links that I generated using autolink. Then in the Ember action for the surrounding div, I did:
if event.target.className == 'autolink' @send('handleAutolink') else
Then on ApplicationRoute I put a handler for the handleAutolink action, which basically cancels the ember action and opens a link with javascript:
handleAutolink: -> event.preventDefault() window.open(event.target.href, '_blank')
I understand that this is probably a giant hack, but I would be glad to hear a different approach!
source share