title: How can I pass a parameter to ng-click inside an ng-repeat?
body: <p>I have this code in which I am repeating over an array and want to add a functionality that if I click on a row, its data is displayed somewhere else on the same page.</p>
  
  <pre><code>&lt;table&gt;
    &lt;button ng-click="console.log('hello')"&gt;view&lt;/td&gt;
    &lt;div&gt;
      &lt;tr ng-repeat="contact in contacts | filter:searchText" &gt;
        &lt;td&gt;{{contact.city}}
        &lt;/td&gt;
        &lt;td&gt;{{contact.firstName}}&lt;/td&gt;
        &lt;td&gt;&lt;button ng-click="console.log(contact.id)"&gt;view&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/div&gt;
    &lt;/table&gt;
  </code></pre>
  
  <p>I can't seem to figure out why none of the ng-click's are working even when I write it to output a simple message to the console.</p>