Quite new to angularJS and trying to pass information from one page to another.
Currently this controller displays a list of customers in a table format, with one column being the "More info".
** adminSearch.html **
<div ng-controller="adminSearch">
...
<tr ng-repeat-start="custObj in customers | filter:custSearch">
<td> {{custObj.id}} </td>
<td> {{custObj.name}} </td>
<td> <a href="#"> More Info </a></td>
</tr>
...
Controller:
** adminSearch.js **
app.controller('adminSearch', ['$scope', function($scope) {
$scope.customers = [{id:1, name:'John', email:'John@example.com', phone:'555-1276', account:123456, mylH: '1'},
{id:2, name:'Mary', email:'Mary@example.com', phone:'800-BIG-MARY', account:123456, mylH: '1'},
{id:3, name:'Mike', email:'Mike@example.com', phone:'555-4321', account:123456, mylH: '0'}];}]);
What I want is when the user clicks "More Info" from the table for one of the customer, it should go to a new page displaying all the information about that customer...
Not sure what the new page needs but I am guessing it needs a new controller:
** customerInfo.html **
<div ng-controller="customerInfo"> ... </div>
** customerInfo.js **
app.controller('customerInfo', ['$scope', function($scope) {
}]);
Thanks for your help is advance!