Here is the scenario, I have a "Get course" button in the page when i click of the button, i'm passing courseId, In getCourse() method am returning $scope.courseId; then i'm passing this variable in $http.post method. but when i debug in developer tool i'm not getting courseId value.
$scope.getCourse= function(){ return $scope.courseId;}
$http.post('js/description.json', $scope.courseId).success(function(data){
$scope.response = data;
})
if i pass static course id like below, i'm getting the course id, so please suggest how to pass dynamic value.
$http.post('js/description.json', {'courseId':'Adobe'}).success(function(data){
$scope.response = data;
})