Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top