Question

I am trying to use Emberjs framework in my app with turbolinks. But I could not search the tutorial in Google. Can you introduce about how to use?

And introduce the tutorial about "Using emberjs with turbolinks" to me?Such as web size, book and so on .

I want to find the answer like: Using angularjs with turbolinks

Was it helpful?

Solution 2

Ember.js and turbolinks does not work well together.

I was using turbolinks and emberjs in a rails 4 app (where turbolinks is included by default) and it was causing errors to me. Especially when I used the browser back button. Turbolinks was causing the page to reload when it was not supposed to, preventing ember to render the template.

More info here as well: Ember.js with Rails4: browser back button crash ember application

OTHER TIPS

We had a similar problem and added a hack to prevent this.

https://gist.github.com/MiguelMadero/7309675

The basic idea is that if you went to a page other than the one where Ember is active, then you stop Ember from running, then listen to page:change events (everytime turbolinks navigate) and try to start ember.

Hope this helps

Ember is very different from Angular, they are not directly comparable, although similar. In short, Angular is an HTML compiler while Ember is a full fledged framework. Just because there is a way to hack together Turbolinks with Angular, doesn't mean that the technique can be directly applied to Ember too (until proved otherwise).

If you are already rendering in the client, I don't see the benefit of using Turbolinks. From stackoverflow questions that I've seen, the troubles of mixing Turbolinks with client rendering will surpass any benefits that you can get from it.

For a better understanding of both of this technologies, I recommend: Turbolinks and the Prague Café Effect, sweep through the comments to!

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