}
return keys;
};
+
+ this.select = function(crm) {
+ console.log( crm );
+ self.selected_username = crm.USERNAME;
+ };
+
+ this.selected_username = '';
+
}
CRM.$inject = ['$xhr'];
<tr>
<th ng:repeat="c in columns" ng:click="columns.$remove(c)">{{c}}</th>
</tr>
- <tr ng:repeat="u in response">
- <td ng:repeat="c in columns">{{u[c]}}</td>
+ <tr ng:repeat="u in response" ng:click="select(u)">
+ <td ng:repeat="c in columns" ng:show="! selected_username || selected_username == u.USERNAME">{{u[c]}}</td>
</tr>
</table>
+
+ <input type=button value="Show ALL results, not just {{selected_username}}" ng:click="selected_username=''" ng:show="selected_username">
+
<input type=checkbox name=debug value=1>
<pre ng:show=debug>
url={{url}}
code={{code}}
response={{response}}
+username={{username}}
</pre>
</div>