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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -