Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
app.controller('Ctrl', function ($scope, $http) {

        $http({method: 'GET', url: "/api/v1/coupons-dunia/coupons-by-website?websiteId=1"}).success(function(data) {
           $scope.onlinedata = data.coupons;
           $scope.website = data.websites;
        });

When I pass www.mydomain.com/cccc/xxxx/ its working fine,But when i try to pass /api/v1/coupons-dunia/coupons-by-website?websiteId=1 its show error, "SyntaxError: illegal character"

I am using AngularJS v1.2.21 .

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Try:

$http({method: 'GET', url: "/api/v1/coupons-dunia/coupons-by-website", params: {websiteId:1})
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.