-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: store a list of elements associated with the logged in user in new custom element #11
Comments
I guess it would be helpful to include the final objective. Basically, I'd like to be able to, on a page, do something like the following:
|
By the way, I've opened a question on StackOverflow that, if answered, should provide means for this to work. Also, there's another related question that was answered, but I believe it was for an older version of Polymer and does not work in 1.0. |
So, it appears that by using the
This is a bad workaround... there has got to be something better, but at least this is kind of progress. |
Max, I'd recommend joining (if you haven't already) https://polymer.slack.com/ Hope this helps. Regards, John Sample Code Venue Information
location="https://zettafy.firebaseio.com/venues" <div class$="[[getClassForItem(venue, venue.expanded)]]" tabindex="0"> [[venue.name]] [[venue.address]] On Tue, Jan 26, 2016 at 1:00 PM, Max Mueller notifications@github.com
|
@johnwhitton, thanks for the response. Actually, I had decided to kind of "dumb down" the question by including a Thanks for the tip about Slack, I'll head over and see if I can get some further support because I'm starting to lose it >.< So, I guess just to clarify (although I'll move to Slack soon), I'd like to use a
Does that make sense? I would like the data to look like the following:
|
Hey @MeTaNoV, thanks for these elements - again, these have been a big help. However, I've hit a bit of a snag and I was wondering if you could help me out, and it may even be a nice feature to add to the set of extended elements.
You put together the
firebase-auth-manager
element, and from there I can easily get the data associated with a particular user. Say, for example, I want to get a list of messages that a particular user has sent, and the list of message IDs are saved under the user tree:Now, here's the complication -- I want to get the contents of each actual message, each of which has an "owner", and provide it in an array or object as a property of a new custom Polymer element:
So, I've already developed a custom element called
x-message-ids
that can be used as follows to get the list of message identifiers under a particular user (users/userID1/messages
):Now, with those message identifiers, I need to perform a query at each message location under /messages to, first, determine if the user is the owner of the message, and, second, get the contents of the messages. I'd like to be able to provide this in an Array that looks like the following:
I think one way of going about this could be to combine
<x-message-ids>
with a<dom-repeat>
, and perform a firebase query to each location using<firebase-document>
:From here, I'm not really sure where to go. Does
_messageLocation
need to be defined within a<script>
tag within the dom-repeat? If so, how do I define an object that all of the firebase-document's have access to, so that, if the query is successful, it can insert its own entry onto?Thanks in advance, and let me know if I have been unclear or can explain any better.
The text was updated successfully, but these errors were encountered: