I'm trying to build a URL in my angular page. Here is a working URL using postman
http://localhost:8080/api/app?user=77787f&path=/&projection=display
To get this to work I'm hard-coding the user and the path for now
so user=77787f path = "/"
My service.js has
function Geneset ($resource) {
var resourceUrl = 'api/app&:userprojection=display';
return $resource(resourceUrl, {}, {
'query': { method: 'GET', isArray: false,
transformResponse: function(data) {
if (data) {
data = angular.fromJson(data);
}
return data;
}},
I have the following in my controller
vm.user = "7966152e-7637-41fa-bbb6-91ee3fbbc3c7&path=/" vm.path = "/"
function loadAll () {
app.query({
user: vm.userId,
path: vm.path,
page: pagingParams.page - 1,
size: vm.itemsPerPage,
sort: sort()
}, onSuccess, onError);
function sort() {
var result = [vm.predicate + ',' + (vm.reverse ? 'asc' : 'desc')];
if (vm.predicate !== 'id') {
result.push('id');
}
return result;
}
Any easy way to create this? I added a second variable in the GET and that is causing me an issue.