1 import {Plugin, IUserProperties} from "app/models";
2 import {CacheService} from "app/services";
3 import {PluginsService} from "../../ng2/services/plugins.service";
6 interface IPluginsTabViewModelScope extends ng.IScope {
13 export class PluginsTabViewModel {
17 'Sdc.Services.CacheService',
21 constructor(private $scope:IPluginsTabViewModelScope,
22 private $stateParams:any,
23 private cacheService:CacheService,
24 private pluginsService:PluginsService) {
29 private initScope = ():void => {
30 this.$scope.plugin = this.pluginsService.getPluginByStateUrl(this.$stateParams.path);
32 this.$scope.version = this.cacheService.get('version');
34 this.$scope.user = this.cacheService.get('user');
36 this.$scope.queryParams = {
37 userId: this.$scope.user.userId