1 namespace app.directives {
3 export class Option implements ng.IDirective {
5 public restrict: string;
6 public replace: boolean;
7 public templateUrl: string;
8 public bindToController: Object;
9 public controller: string;
10 public controllerAs: string;
11 public scope: boolean;
21 this.controller = 'optionController';
22 this.bindToController = {
27 this.templateUrl = 'templates/option.html';
28 this.controllerAs = 'ctrl';
33 * @returns {function(): HeaderMenu}
36 public static Factory(): ng.IDirectiveFactory {
37 var directive = () => {
40 directive.$inject = [];
45 export class OptionController {
47 public static $inject = [];
49 private info: declares.IOption;
52 var controller = this;
54 // データバインディングしているarg.inputに
55 // OptionControlFileに記された初期値(arg.initialValue)を代入
56 angular.forEach(controller.info.arg, (arg) => {
57 if(arg.initialValue) {
58 if(arg.formType === 'number') {
59 arg.input = parseInt(arg.initialValue);
61 arg.input = arg.initialValue;
68 export class Option implements ng.IDirective {
70 public restrict: string;
71 public replace: boolean;
72 public templateUrl: string;
73 public bindToController: Object;
74 public controller: string;
75 public controllerAs: string;
76 public scope: boolean;
86 this.controller = 'optionController';
87 this.bindToController = {
92 this.templateUrl = 'templates/option.html';
93 this.controllerAs = 'ctrl';
98 * @returns {function(): HeaderMenu}
101 public static Factory(): ng.IDirectiveFactory {
102 var directive = () => {
105 directive.$inject = [];
110 export class OptionController {
112 public static $inject = [];
114 private info: declares.IOption;
117 var controller = this;
119 // データバインディングしているarg.inputに
120 // OptionControlFileに記された初期値(arg.initialValue)を代入
121 angular.forEach(controller.info.arg, (arg) => {
122 if(arg.initialValue) {
123 if(arg.formType === 'number') {
124 arg.input = parseInt(arg.initialValue);
126 arg.input = arg.initialValue;
132 >>>>>>> 6b2b2b88511733893d2c6e7848c389abfcd53ba6