angularjs - Angular JSONP showing Uncaught SyntaxError: Unexpected token : -
i'm trying retrieve data object using jsonp
getting message uncaught syntaxerror: unexpected token :
my js codes:
factory
datafactory.getgroupdetails = function(id) { return $http({method: 'jsonp', url: get_base_url().concat("group-setting?id=").concat(id)}); };
call angular controller
dataprovider.getgroupdetails(id).then(function( response ) { console.log(response.id); );
server site script:
die(json_encode( ['id' => $group_id] ));
how solve problems. suggestion appreciated.
Comments
Post a Comment