Hi  Eric,

Is there any way to do it with out reloading ng-controller? don't want to 
write ng-controller inside repeat.

On Wednesday, July 9, 2014 at 10:18:02 AM UTC+5:30, 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 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to