Searching for models into client cache
Change-Id: Ib65b1565153040684083fbc21a59e8c8365628fd
diff --git a/src/app/core/services/helpers/config.helpers.ts b/src/app/core/services/helpers/config.helpers.ts
index fd5e8e0..d0fbed9 100644
--- a/src/app/core/services/helpers/config.helpers.ts
+++ b/src/app/core/services/helpers/config.helpers.ts
@@ -30,6 +30,7 @@
urlFromCoreModel(model: string): string;
stateFromCoreModel(name: string): string;
stateWithParams(name: string, model: any): string;
+ stateWithParamsForJs(name: string, model: any): any;
}
export class ConfigHelpers {
@@ -192,6 +193,12 @@
return `${state}({id: ${model['id']}})`;
}
+ public stateWithParamsForJs(name: string, model: any): any {
+ // TODO test and interface
+ const state = this.stateFromCoreModel(name);
+ return {name: state, params: {id: model.id}};
+ }
+
public modelFieldToInputCfg(fields: IXosModelDefsField[]): IXosFormInput[] {
return _.map(fields, (f: IXosModelDefsField) => {