title: How do I pass data from the list view template to edit view template using angular
body: <p>I am creating an <code>SPA</code> using angular and <code>ASP.NET Web API</code>. I use <code>ui-router</code> module. I have a list view displaying customers with an edit button through which I want to pass a <code>customerId</code> to the <code>editCustomerController.js</code> to be used to fetch the customer to edit from the web <code>API</code>. 
  I can't seem to make heads on this.</p>
  
  <p><em>CustomerView.html</em></p>
  
  <pre><code>&lt;tr ng-repeat="customer in vm.customers"&gt;
    &lt;td&gt;{{$index + 1}}&lt;/td&gt;
    &lt;td&gt;{{customer.identificationNumber}}&lt;/td&gt;
    &lt;td&gt;{{customer.surname}}&lt;/td&gt;
    &lt;td&gt;{{customer.otherName}}&lt;/td&gt;
    &lt;td&gt;
       &lt;a ui-sref="customerEdit" ng-click="vm.setSelectedCustomerId(customer.id)"&gt;
        &lt;i class="fa fa-pencil-square-o"&gt;&lt;/i&gt;
       &lt;/a&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  </code></pre>
  
  <p>How do I pass the <code>customerId</code> to the <code>editCustomerController.js</code> from this template?</p>