1 namespace app.controllers {
2 export class Execution {
4 public static $inject = ['MyModal', '$scope'];
6 public commandInfoList: declares.CommandInfo[];
10 constructor(private MyModal: services.MyModal, private $scope: ng.IScope) {
11 this.commandInfoList = [];
15 // close all <uib-accordion> tag
16 this.$scope.$broadcast('close');
18 // add <command> directive
19 this.MyModal.selectCommand();
20 this.commandInfoList.push(new declares.CommandInfo('mrcImageNoiseAdd'));
24 var result = this.MyModal.open('SelectCommand');
28 public remove(index: number, list: declares.CommandInfo[]) {
29 list.splice(index, 1);
32 * Commandディレクティブから実行する際にはExecution.commandInfoListの参照を取得できない。
33 * ディレクティブ経由でExecution.commandInfoListの参照を取得。
34 * this.commandInfoList.splice(index, 1);
36 * thisがremoveの呼び出し元となるため。