I'm creating a large AngularJs App, which requires User Login.
After authenticating user, a page is rendered to him and subsequent data is loaded later.
There are two ways for this:
XHR Fetch after Page Load:
This means sending an XHR request in 'run' block or somewhere to get LoggedIn user. say to'/api/current_user.json'Data Embedded in HTML
To avoid initial load time of above method, I think its good to embed someJSONin Html page as a<script>tag.
However, I'm unable to get this data in 'script' tag from my module.run block.
How can I do that ?