I have repeatedly searched for, and come across questions and answers on the possibilities of accessing session-, and requestscoped data with client side javascript or similar. The answer seems to be a consistent "no you can't do that". But the Front Controller pattern, as described here, forwards the java objects for request and response, and exposes them for retrieval in the browser, through Expression Language.
To me this seems like a great approach, as it passes along data at the same time as the redirect. In other words, if the web page has a table that should be populated with default, but currently updated data (say weather report for next week). All other approaches seems to include loading the website first, and then loading data to populate, through ajax or similar.
I've been starting to look at angular, and RESTful api's, and I am having a hard time grasping even the basics. One of the upsides of angular, should be it's ability to divide front side code into modules, and include template html's, without loading them seperately. But it seems like in a RESTful api, I can't pass along dynamic initial values to be displayed on a page.
So with a RESTful api structure, am I right to assume that I need to load the page first, and then retrieve the data through the $http-service? And if so, why is it designed, so that I need to make a double (or multiple) request to the server? If not, how can I pass data to the page, as the server redirects to it? Am I wrong to use redirects in the first place?