title: Polymer dom repeat index to a variable
body: <p>So I have this dom repeat where all lessons get displayed of the class of an user which I get from a json.</p>
  
  <pre><code>&lt;template is="dom-repeat" items="{{lessen}}"&gt;
      &lt;div&gt;&lt;paper-button id="{{index}}" on-click="toggleDialog"&gt;{{index}} - {{item.lessen}}&lt;/paper-button&gt;&lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>Is there a way I can get the value of '{{index}}' to send to my backend via iron-ajax? I got this function: </p>
  
  <pre><code>sendAfmelding: function() {
        console.log("Afmelden van les met user="+this.username);
        if (this.rol == "student") {
          console.log("indexnummer = "+this.$.index);
          this.$.ajax2.contentType="application/json";
          this.$.ajax2.body={
            "username":this.username,
            "lesIndex":this.$.index    // &lt;-- needs to change
          };
          this.$.ajax2.generateRequest();
        }
      }
  </code></pre>
  
  <p>I got everything correctly set up. Username get's send and everything, the only thing I still need is that index value. For example, if I put</p>
  
  <pre><code>"lesIndex":"1"
  </code></pre>
  
  <p>in my function my code will do exacly what I want but ofcourse I want the user to select the lesson himself.</p>
  
  <p>I hope my question is a bit clear, thanks in advance! </p>