javascript - How to call a REST function from the services.js? -


i got rest function this:

@override public string getnameformw() {     string mw_url = props.getproperty("mw_url"); //<<this returns string     return mw_url.split("/")[3].tostring(); } 

then have interface:

@get @produces(mediatype.text_plain) @path("/getnameformw") public string getnameformw(); 

then have services.js file, factory located, , there line:

var pathformw = $http.get(path + 'getnameformw'); 

but outcome not string object this: enter image description here

can u me?

i need simple string, reed properties file

thx deceze, came this

var pathformw = $http.get(path + 'getnameformw').then(function successcallback(response) {     // callback called asynchronously     // when response available     pathformw = response.data;    } ); 

that solved problem.... thx again


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -