-2
AngularJS를 사용하여 URL 쿼리 매개 변수의 값을 읽고 싶습니다. 나는 다음과 같은 URL과 HTML에 접근하고 있습니다 :각도로 기본 쿼리 매개 변수를 구문 분석하는 방법
http://demo.com/demo/demo.html?param1=125¶m=4
컨트롤러 : 내가주고의 URL에서 매개 변수 각도 사용을 얻고 싶은
App.controller('DrawsController', ['$scope','$q','$location','$http', function($scope,$q,$location,$http){
\t var deferred = $q.defer();
\t $http({
\t \t url: "./api/api.php",
\t \t method: "get",
\t \t dataType: "json",
\t \t params: {
\t \t \t param1: $location.param1,
\t \t \t param: $location.param
\t \t }
\t })
\t .success(function (data, status, headers, config) {
\t })
\t .error(function (data, status, headers, config) {
\t });
\t deferred.promise;
}]);
@neelsg을 타사 API 요청. – Vishal