Looking to optimize my Angular application's data structure when consuming a RESTful API. My goal is to only load necessary data from the server on demand.
For instance, if I have a collection of Building
objects each with a set of tenant IDs in an array instead of full Tenant
objects. This way, when listing buildings in the app, I can display basic details and fetch individual tenant information from the API asynchronously only when needed. It helps avoid fetching all tenants upfront for every building.
Is this a common approach in web applications? Struggling to find resources on this specific topic, especially implementations tailored for Angular.
Appreciate any insights or Angular-specific examples on implementing this strategy!