How to Return data from a function inside a polymer dom-module?

31 views
Skip to first unread message

Fabio Paniconi

unread,
Oct 8, 2015, 4:17:06 PM10/8/15
to Polymer
Did ask same question on stackhttp://stackoverflow.com/questions/33002056/how-to-return-data-from-a-function-inside-a-polymer-dom-module and stack chat, but no one could help yet.

Any help is appreciated, thanks.

Max

unread,
Oct 9, 2015, 3:39:50 AM10/9/15
to Fabio Paniconi, Polymer
I don't see where your function 'test()' actually returns anything. test() just instantiates a firebase class and registers an event handler for it, but that doesn't cause test() to return a value.

As a debug step, on the first line of the function 'test()', put 'return 'hello world';' and see if that works.

If that does work, then I think you essentially need to change the way you're using firebase. I recommend you take a look at the firebase html element :

<https://elements.polymer-project.org/elements/firebase-element?active=firebase-collection>

and bind to that directly.

Hope this helps.

Max.

On Thu, 8 Oct 2015 at 21:17 Fabio Paniconi <fabio.p...@gmail.com> wrote:
Did ask same question on stackhttp://stackoverflow.com/questions/33002056/how-to-return-data-from-a-function-inside-a-polymer-dom-module and stack chat, but no one could help yet.

Any help is appreciated, thanks.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/f849644c-aeed-4c7c-a792-f7de11b8fbb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages