Added child routes, and config defined routes
Change-Id: I61c5a49a330a63737312d1eb6077aab02236a44f
diff --git a/src/app/core/services/helpers/config.helpers.ts b/src/app/core/services/helpers/config.helpers.ts
index 44d3cdc..3e0af96 100644
--- a/src/app/core/services/helpers/config.helpers.ts
+++ b/src/app/core/services/helpers/config.helpers.ts
@@ -11,6 +11,7 @@
modeldefToTableCfg(fields: IXosModelDefsField[]): any[]; // TODO use a proper interface
pluralize(string: string, quantity?: number, count?: boolean): string;
toLabel(string: string, pluralize?: boolean): string;
+ toLabels(string: string[], pluralize?: boolean): string[];
}
export class ConfigHelpers {
@@ -24,13 +25,15 @@
return pluralize(string, quantity, count);
}
- toLabel(string: string, pluralize?: boolean): string {
-
- if (angular.isArray(string)) {
- return _.map(string, s => {
+ toLabels(strings: string[], pluralize?: boolean): string[] {
+ if (angular.isArray(strings)) {
+ return _.map(strings, s => {
return this.toLabel(s, pluralize);
});
}
+ }
+
+ toLabel(string: string, pluralize?: boolean): string {
if (pluralize) {
string = this.pluralize(string);