3 ms·
Can you please explain how to store data from the server on a "root component"? The data portion is the main reason I was looking at Angular. Thank you.
by rebelidealist 12y ago
Can you please explain how to store data from the server on a "root component"?
The data portion is the main reason I was looking at Angular.
Thank you.
- mercer 12y agoIf you keep it client-side: you turn the server-side data into json, then pass that to the renderComponent function (in a script tag or whatnot). Inside your component, you'd use this data in the getInitialState function to set the state of this component (which could pretty much be the whole page). Does that answer your question?