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:
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
Post a Comment