Search code examples
ruby-on-railsangularjsturbolinks

Does AngularJS make Turbolinks pointless?


From Turbolinks page:

Turbolinks makes following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head

If I want to build a rich client-side application with AngularJS, does that framework make pointless Turbolinks?


Solution

  • The answer is NO. They both work differently and and their main goal is different.

    Turbolinks work on a Rails webapp that responds with HTML.

    Angular JS or any other JS frameworks makes use of a JSON API backend.

    There is not extra coding required to use turbolinks. Turbolinks is just a way of making pages to load faster by minimizing the content that is being transferred. Only replacing the HTML body tag

    With JS framework, you have to build the entire front-end application. This is particularly useful as the same backend can be used to develop mobile apps