What is best practice to use angular with rails 4. I can think of
- Create an JSON API only rails app and deliver a single page app to
client and angular take care of talking to API.
- Create an normal rails app with API which delivered through
api.domain.com. Serve single page app and angular talk to api.
(turbolinks can cause problems, but at least browser without json
can view a html page rendered by server)
- Same as 2 but instead single page app, each rendered view is
as mini-SPA, I don’t think it will be very helpful.
So what is best practice to use angular with rails 4.
I think this post is not particular to angularjs and seek best
with client side MV* frameworks(like knockout and others).
I am creating a new application so I can decide early and choose best
practice early and don’t have to undo already made decisions if it was a