1

I have re-designed and deployed our commercial site using 100% Ember using pushState to increase the search engines capability to browse the site content.

But, I have one issue that I am not sure how to solve. I am using "actions" to redirect to Ember App routes.

As an example, here an "a" tag:

<a {{action "doSales"}} title="Sales and after sales services">Sales and after sales services</a>

The associated action:

doSales: function(router, event) {
    router.transitionTo('sales');
},

And the route:

sales: Ember.Route.extend({
    route: '/:locale/sales',

But, in the DOM, the final a tag will look like:

<a data-ember-action="9" title="Sales and after sales services">Sales and after sales services</a>

As you can see there's no href="/en/sales"

Which means that if I ask a browser to browse my site, it won't be able to dig down the site structure.

Does anyone knows

nembleton
  • 2,392
  • 1
  • 18
  • 20

1 Answers1

4

Action href support was removed with the new router. If you want href's on your anchor tags, you will either need to move to using the {{#linkTo}} helper (which generates them automatically) or add in the href values manually.

Bradley Priest
  • 7,438
  • 1
  • 29
  • 33
  • Excellent. I'll give a shot to this. I was focus on previous release and didn't catch up with the new versions. Will try and come back for feedback. Thanks for the answer. – nembleton Feb 28 '13 at 10:08
  • Yes, thanks. It does what I was needing it to. But a huge load of modifications to rewrite my router. – nembleton Mar 10 '13 at 10:05