There are a couple options for treating the JS lib as a regular dependency (that only loads once):
One approach is to create a new HTML file that's sole purpose is to load the library - and then you import that HTML file. Alternatively, we also provide a helper for this in the form of https://github.com/Polymer/core-shared-lib On Thu, Dec 11, 2014, 09:57 null <[email protected]> wrote: > I am just starting out to learn Polymer. > I have built a small web application using it but I find myself puzzled > about how to organize my javascript files. > If my polymer components that go on the same HTML page and a number of > them need to use the same javascript library, > do I include that js file at the very top HTML page? Because that's is > what I am doing right now basically. > I have a long list of all the javascript files that all the polymer > components on that page needs. > Inside the polymer components code, they assume those javascript libraries > are included already and start using them. > > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/polymer-dev/c92cf77a-b5ca-4781-ab12-45ed9c5ceef6%40googlegroups.com > <https://groups.google.com/d/msgid/polymer-dev/c92cf77a-b5ca-4781-ab12-45ed9c5ceef6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAKc-BFi5d3WvHTDYheqp4uiZ99Ztmj68zN9e-gTO%3Dois-7zFEQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
