angularjs - How to create complex query parameters in Restangular -
i need create complex query string in restangular.
http://vdmta.rd.mycompany.net//people?anr=smith&attrs=givenname,displayname,name,cn
how do this?
so far ok getting far ?anr=smith using this:
return restangular.all('/people').getlist({anr:searchterm});
the lastly part attrs=x,y,x lets me command attributes want in search , alter per request make.
any advice appreciated.
regards
i
you should able add together query parameter value comma separated list of attributes.
var attributes = ['givenname' , 'displayname']; // attributes require request var attributesasstring = attributes.join(); homecoming restangular.all('/people').getlist({ anr : searchterm, attrs: attributesasstring });
angularjs rest restangular
No comments:
Post a Comment