Change designer to plugin in code
[sdc.git] / catalog-ui / src / app / ng2 / services / plugins.service.ts
1 import { Injectable } from '@angular/core';
2 import {Plugin, PluginsConfiguration} from "app/models";
3
4 @Injectable()
5 export class PluginsService {
6
7     constructor() {
8     }
9
10     public getPluginByStateUrl = (stateUrl: string) => {
11         let pluginKey: any = _.findKey(PluginsConfiguration.plugins, (pluginConfig: Plugin) =>{
12             return pluginConfig.pluginStateUrl ===  stateUrl;
13         });
14
15         return PluginsConfiguration.plugins[pluginKey];
16     }
17 }