This is a 2-part queastion.
First, I'd like your input as to how you would design the data for these

    - A user can have multiple lists, every list belongs to just one user
    (user <-->>list)
    - A list has multiple listItems, and a listItem can belong to multiple
    lists (list <<-->>listItem)
    - A listItem has multiple listItemLogs, and each listItemLog belongs to
    just one listItem (listItem <-->>listItemLog)

Important note: I really doubt that listItemLog should be an object, as
it's just one piece of data - a timestamp as epoch.



listItems in list:



And second, while taking into consideration the data structure you offer,
how would you merge (in order to display using ngRepeat ) all listItems in
one list, with the logs of the past week (using moment.js to get the epoch
values for weeks start and end is trivial). Note that for performance
reasons, it's probably better to bind only one list's items, and only one
week's logs.

For example, if list "list1" has items "itemA" and "itemB", and itemA was
logged twice on that week, the list should show (in pseudo code) :


I hope the question is clear, and thanks in advance!
No problem using the latest versions (currently AngularFire is at 0.92)

You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/849fc803-e6ec-48b0-b922-7f4465a5a035%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupfirebase-angular @
postedFeb 2, '15 at 5:23p
activeFeb 4, '15 at 3:08p

2 users in discussion

AngelEyes: 2 posts Kato Richardson: 1 post



site design / logo © 2021 Grokbase