I am redirecting to edit page after clicking on edit button.
<button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal" data-target="#edit" ng-click="editData(n.id.userId)"><span class="glyphicon glyphicon-pencil"></span></button>
On click on this button following code is working.
$scope.editData = function (data, $window) {
console.log(data);
window.location = 'update-data?id=' + data;
}
Now I am redirected to www/xxx/update-data?id=1
url.
From there I want to fetch user data for id=1 and want to show at page.
How to achieve this?