Oho, I didn't even notice the day in days ng-repeat. Yeah, in that case,
this feels either like time to do one big request or time to do something
like explicit controllers or a directive.

Given the repeats, I'd consider a directive (or even nested directives) if
you end up wanting to make any complex view state variables per day or per
assignment (like expanded or whatever).

E
On Jul 8, 2014 9:48 PM, "Sander Elias" <[email protected]> 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.
>

-- 
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