Serving Polymer App to a /path not at root

The polymer-cli created apps came with assumption of serving from root level “”. In generated project index.html you will find two comments <!– The `<base>` tag below is present to support two advanced deployment options: 1) Differential serving. 2) Serving from a non-root path. Instead of manually editing the `<base>` tag yourself, you should generally … Read more

Polymer 1.0: How to pass an argument to a Polymer function from an attribute?

You could utilize HTML5 data attributes instead. Try like this: <paper-button id=”foo” on-tap=”bar” data-args=”foo,some other value,2″>Click</paper-button> … <script> (function() { Polymer({ is: ‘example’, properties: {…}, bar: function(e){ var args =‘data-args’).split(‘,’); // now args = [‘foo’, ‘some other value’, ‘2’] } }); })(); </script>

Polymer element with javascript dependencies

Private resources should be installed in your component folder and used directly. But shared resources, those resources that other components my also want to use (like marked), should be handled as dependencies. We suggest two conventions for handling shared dependencies: always use the canonical path which is ../<package-name> (you did this already). Polymer by convention … Read more