Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset=utf-8 />
    <title>Polymer Demo</title>
  </head>
  <body>
    <script src="http://www.polymer-project.org/platform.js"></script>
    <link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
    <link rel="import" href="http://www.polymer-project.org/components/core-localstorage/core-localstorage.html">
    
    <template is="auto-binding">
      <core-localstorage name="itemsApiURL"
                         value="{{itemsApiURL}}">
      </core-localstorage>
      <label for="inputElement">itemsApiURL:</label>
      <input type="text"
             id="inputElement"
             value="{{itemsApiURL}}"
             size="50">
    </template>
    
    <script>
      var template = document.querySelector('template');
      template.addEventListener('template-bound', function() {
        template.itemsApiURL = template.itemsApiURL || 'http://server:port/api/items';
        
        // You can do something with template.itemsApiURL
        // like use it to make an API call, etc.
      });
    </script>
  </body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jeffposnickpro
0viewers