DanWahlin / Angular-JumpStart

Angular and TypeScript JumpStart example application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass customer entity to customer detail ?

sam-wheat opened this issue · comments

Firstly, thank you for this outstanding demo. It is really well done and very helpful.
Now, I notice we pass customer id in the query parameter from the customers page. Is it possible to pass (or bind to) the entire customer entity in the detail page since we already retrieved it from the data store?

Regards, Sam

Thanks Sam. Glad to hear you found the example useful.

The initial homepage load of customers technically would just pull down a subset of an overall customer's data so we'd normally (in a real app hitting a database) want to then query for all of the customer data to use in the details page. However, assuming that the customer loaded by the initial home view is the same entity used by the details page then it could be stored in a service and then accessed in the customer detail views by calling into the service.