Reputation: 133
im just tryin to pass a parametr into location.path,
$http({
method: 'POST',
url: '../controller/subscriber.php',
data: $scope.data,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
})
.success(function (data) {
if (data.error === "false") {
$location.path("/group/detail/$routeParams.gId");
}
});
Upvotes: 2
Views: 1076
Reputation: 21
to add Parameters you should use $location.search() method so:
$location.path('/myURL/').search({param: 'value'});
$location
methods are chainable.
this produce :
/myURL/?param=value
Upvotes: 2
Reputation: 1478
to add Parameters you should use this
$location.path("/group/detail/"+$routeParams.gId);
Upvotes: 2