title: reusable function to get elements of repeater by index
body: <p>How to use a function in  Page Object file to give elements of particular index in repeater when pass index to the function.      </p>
  
  <pre><code>this.IncList = element.all(by.repeater("incident in $ctrl.allIncidents"));
  this.Inc2ndElement  = this.IncList.get(1);
  </code></pre>
  
  <p>How can I put it in a function so that every time I pass a Index value to function and element at that index will be returned. </p>