Using $parent can get you the parent scope's original array. From there, the array indexOf() function will get you the index of the element with respect to its array. In your code it looks like this
company # = {{$parent.companies.indexOf(company)}} and product {{$index}}