I have a Users table in the user view, which contains a column for sales with add button. by clicking on add button it should redirect to the sales view and pre-filled up the input fields with user details. the table is as below :
<table class="row-border hover" datatable="ng">
<thead>
<tr>
<th class="thbg">Sr.</th>
<th class="thbg wd-wide">Name</th>
<th class="thbg">Type</th>
<th class="thbg">Contact</th>
<th class="thbg">Sales</th>
<th class="thbg">Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="list in table.customer_list">
<td>{{$index + 1}}</td>
<td>{{ list.prefix + ' ' + list.firstname + ' ' + list.lastname}}</td>
<td>{{ list.type}}</td>
<td>{{ list.contact}}</td>
<td>{{ list.sales}} <button class="btn btn-sm btn-info pull-right tbar"><i class="fa fa-plus-square fa-lg"></i></button>
</td>
<td>
<div demo>
<button class="btn btn-sm btn-warning tbar pull-right" ng-click="table.scroll();table.showForm=true; table.edit(list.id)">
<i class="fa fa-pencil-square fa-lg"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
I am using Angularjs at client side. How do I switch controller with parameters.