Hi Sander,

Yes, I would love to see sample codes.  I'm new to Angular.  Yes, I read a 
lot about asyn & promise as well but I have found no solution so far.

Thank you so much,

Tan

On Tuesday, July 8, 2014 9:48:02 PM UTC-7, Sander Elias wrote:
>
> Hi Eric,
>
> You are right, they need to catch up on ansync and promises.
> However, simply setting the the data on the scope in your controller will 
> not work in this case! The scope inside the ng-repeat is an nested scope. 
> This is a legit use off the ng-init directive. It is simply used to create 
> a temporary var on the scope where you need the data.
>
> However, when you want to resolve async data inside a child scope, it will 
> not work using ng-init anymore.
>
> @Lovi and @Tan, 
> This can be solved by using an ng-controller inside the repeat, that 
> resolves your data. I can write sample code if you want.
> However, I think it's a really bad idea design wise. You will start 
> 'spamming' your servers with loads of really small requests.
> it's better to load all that data in a single request, and do that before 
> looping trough the top-data. 
> Does this make sense?
>
> 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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to