javascript - Working in Angular js with remote REST API -


i want know if there way call remote rest api call within angular js .

as of now, have setup , bower dependency management , grunt server , other build task runner (minification,compression,). angular js front-end framework.

i have rest api deployed on server xxx.xxx.xxx.xxx:9090 . , have configured cors filters on server .

if access rest api within angular js app, makes 2 requests 1 option , http verbs .

on many blogs, found opening cors filter on server security risk.

so there safe way without enabling cors on server , , consuming rest api in angular without domain problem.

as running angular app on localhost , rest api deployed remotly

and after building application using grunt running in tomcat server . know not right don't have choice apart due various access issues on client side

thanks in advance

there more 1 way,

if using grunt, can use grunt-connect-proxy route call different server api.

if using apache, can set proxypass.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -