javascript - how to pass parameters to redirected page? -
i have script work on button click:
$scope.showdetailsaboutticket = function (pinticket) { if ($scope.showdetail == false && pinticket != null) { $scope.pinticket = pinticket; $http.get(ticketurl + 'getticket/' + $scope.terminalid + '/' + $scope.pinticket) .success(function(data, status, headers, config) { $("#background").addclass("darker"); $scope.showdetail = true; $scope.ticketnotfound = false; $location.search("ticketid", pinticket); }) .error(function(data, status, headers, config) { $scope.ticketnotfound = true; $scope.showdetail = false; }) .then(ticketdetails, errorresponse); } }
everything works fine.i url :http://localhost:60664/home#?ticketid=8837278738
want when user click on button redirect him sport page parameters...how can that? tried window.location dont parameters
you should define routes in configuration , should invoke route when user clicks button.
you can use either ng-route or more extended version ui-router.
Comments
Post a Comment