summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services/designers.service.ts
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-01-23 15:53:11 +0200
committerIdan Amit <ia096e@intl.att.com>2018-01-24 21:00:39 +0000
commitae4ab937ea76cbd15dfb572d67ddd7d672503336 (patch)
tree12c78406974589581a82c281146311180e18a00d /catalog-ui/src/app/ng2/services/designers.service.ts
parent45772e3924ee075e9674864eb32586d7cdb276b4 (diff)
Add designer service
Fixed a bug in the configuration Change-Id: I6a40bff70ed71d72d6b75104ffb1002d83ade1b2 Issue-ID: SDC-958 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/services/designers.service.ts')
-rw-r--r--catalog-ui/src/app/ng2/services/designers.service.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/services/designers.service.ts b/catalog-ui/src/app/ng2/services/designers.service.ts
new file mode 100644
index 0000000000..283b54b964
--- /dev/null
+++ b/catalog-ui/src/app/ng2/services/designers.service.ts
@@ -0,0 +1,17 @@
+import { Injectable } from '@angular/core';
+import {Designer, DesignersConfiguration} from "app/models";
+
+@Injectable()
+export class DesignersService {
+
+ constructor() {
+ }
+
+ public getDesignerByStateUrl = (stateUrl: string) => {
+ let designerKey: any = _.findKey(DesignersConfiguration.designers, (designerConfig: Designer) =>{
+ return designerConfig.designerStateUrl === stateUrl;
+ });
+
+ return DesignersConfiguration.designers[designerKey];
+ }
+}