I have a degree in CS (not that comparing penis sizes here matters :), but
Javascript is a different beast.  If you want to use arrays like
dictionaries (which we don't call them that in js - sounds like python), be
sure to understand that an email address as an index is not a great idea.
 Here's something to consider:

var data = {
  user: {
    name: 'bob'
  }
}

you can access object values with dot syntax as well as array/dictionary
syntax:

data.user.name == data['user'].name == data['user']['name']; //true

On your nested ng-repeats, it's going to be a challenge to reference the
detached monologues by an index of the email address from the user object
(not impossible).  At the least I would keep it simple by using another way
to reference monos belonging to the user.

good luck!



On Fri, Apr 4, 2014 at 9:30 AM, Sander Elias <[email protected]> wrote:

> Hi,
>
> My data structures might be hard to understand, but I've had graduate
> level coursework in data structures and a master's in applied math. Your
> suggestion regarding another way of structuring the data makes sense, but
> given your restructuring, I don't yet see confusion regarding data
> structures in having a list of users and a hash of lists of monologues on a
> per-user basis.
>
> Wow, you must be crazy smart ;)
>
> You did:
> angular.extend($scope, data);
>
> that means your merged your data into your scope right?
> It seems to me then you need to do this:
>
>    <div ng-repeat='user in users'>
>        <div ng-repeat='monologue in monologues[user]'>
>
> But then again, what do I know.
>
> Regards
> Sander
>
>   --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/8xN-TP_EIpc/unsubscribe.
> To unsubscribe from this group and all its topics, 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