<span ng-switch="$ctrl.getWidget()">
  <span ng-switch-when="checkbox">
    <label ng-repeat="(val, label) in $ctrl.param[$ctrl.flag]" ng-if="val">
      <input type="checkbox" ng-checked="$ctrl.arg[$ctrl.flag] === val" ng-click="$ctrl.arg[$ctrl.flag] = ($ctrl.arg[$ctrl.flag] === val ? null : val); $ctrl.writeExpr();" >
      {{ label }}
    </label>
  </span>
  <select ng-switch-when="select" class="form-control" ng-model="$ctrl.arg[$ctrl.flag]" ng-change="$ctrl.writeExpr();">
    <option ng-repeat="(val, label) in $ctrl.param[$ctrl.flag]" value="{{ val }}">
      {{ label }}
    </option>
  </select>
</span>
