Reputation: 306
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 .
Upvotes: 1
Views: 495
Reputation: 52847
Try:
$http({method: 'GET', url: "/api/v1/coupons-dunia/coupons-by-website", params: {websiteId:1})
Upvotes: 2