resources - How to access the RESTful services from external server in my server in angularjs -


i running on domain server1.

i have restful services on server2.

i want access restful service on webpage using angularjs. tried way. it's returning empty array. no data bind. why? suggestions. here sample code.

in sample code, resource definition looks this:

var utilservice = $resource('server2/users/:userid', { },     {         'get' : { method: 'get',headers: {'content-type':'application/json'}, params: { userid:'anil' } , isarray : true }     } ) 

that url appears relative. if you're trying target remote server, you're going need resolvable uri. unless that's mangled in anonymizing of example, think that's issue.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -