I am trying to pass a parameter to the next page (edit page) by clicking on an edit button. The code I have tried is not working as expected. When I click on the button, the URL is displayed correctly but the page shows up blank and the controller does not load. Can you help me identify what is causing this issue?
http://localhost:8080/#/group/edit?id=586351373b6bba91152ab744
View
<md-button class="md-raised md-primary" ng-click="doEdit(item._id)" title="Edit">Edit</md-button>
Route
$routeProvider.when('/group/edit', {
templateUrl: 'template/group_edit.html',
controller: 'GroupEditCtrl'
})
Controller
$scope.doEdit = function (id) {
$location.path('/group/edit').search({id: id});
}