Twisted reality
Twisted reality

Reputation: 540

Not able to set query param in $http GET call

I want to give value from dropdown to $http get in angular to show record from it. but it won't show. here's my code btw.

.js

app.controller("cobacont", ['$scope', '$http', function($scope, $http) {
    $scope.cari = function() {
        $http.get('https://........a={{month}}').then(function(response) {
            ...........
        });
    };
}]);

Upvotes: 1

Views: 59

Answers (1)

Gaurav Kumar Singh
Gaurav Kumar Singh

Reputation: 1570

Update this line for code correction

$http.get('https://........a='+$scope.month).then(function(response){

Upvotes: 1

Related Questions