1
0

Initial application generated by JHipster-5.8.2

This commit is contained in:
Michael Hoennig
2019-04-01 13:14:56 +02:00
commit e0b3d2a36d
404 changed files with 49698 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { HttpParams } from '@angular/common/http';
export const createRequestOption = (req?: any): HttpParams => {
let options: HttpParams = new HttpParams();
if (req) {
Object.keys(req).forEach(key => {
if (key !== 'sort') {
options = options.set(key, req[key]);
}
});
if (req.sort) {
req.sort.forEach(val => {
options = options.append('sort', val);
});
}
}
return options;
};