Sorry Sander, I don't understand your response. Could you please clarify?

As for my requirement, I need to render orders including the customer name. 
Suppose the component template looks like this:

<tr ng-repeat="order in vm.filledOrders">
    <td>{{order.id}}</td>
    <td>{{order.customer.firstName}} {{order.customer.lastName}}</td>
</tr>

This requires the customer to be nested inside the order. I could easily 
arrange the model to be that way, but I really like the idea of a 
normalized model as suggested by Dan Abramov - it would allow the change of 
a single entity to have minimal changes in the state tree and thus speed up 
rendering. Thoughts?


On Tuesday, April 26, 2016 at 12:25:13 AM UTC-4, Sander Elias wrote:

> Hi Naresh,
>
> I'm not going to answer your 2 questions ;)
>
> Here is an alternative, that avoids this completely. Create a component 
> that I would call 'showCustomer'. Let it display the customer by a simple 
> lookup by customerId.
>
> Does that help you a bit?
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to