2

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");
                }

            });

2 Answers 2

2

to add Parameters you should use this

 $location.path("/group/detail/"+$routeParams.gId);
Sign up to request clarification or add additional context in comments.

Comments

2

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.