title: Vue.js: How to read $index inside computed function?
body: <p>I have list of links:</p>
  
  <pre><code>  &lt;ul id="menu"&gt;
       &lt;li v-for="item in items"&gt;
         &lt;a href v-bind:href=link&gt;{{item.message}}&lt;/a&gt;
       &lt;/li&gt;
    &lt;/ul&gt;
  
  
    var example1 = new Vue({
    el: '#menu',
    data: {
       items: [
          { message: 'Link1' },
          { message: 'Link2' }
       ]
    },
    computed: { 
        link: function() {
            return f($index)    // how do I access current array index ??
        }
    }
    })
  </code></pre>
  
  <p>I can achieve the desired result by using mustache markup in a <code>href</code> attribute but it must be possible to access this <code>$index</code> variable from within a computed function?</p>