1
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 .

1 Answer 1

2

Try:

$http({method: 'GET', url: "/api/v1/coupons-dunia/coupons-by-website", params: {websiteId:1})
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.