diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/services/designers.service.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/services/designers.service.ts | 17 |
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]; + } +} |