All Downloads are FREE. Search and download functionalities are using the official Maven repository.

widgets.pbCheckbox.pbCheckbox.ctrl.js Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
function PbCheckboxCtrl($scope, $log, widgetNameFactory) {

  $scope.$watch('properties.value', function(value) {
    if (value === 'true' || value === true) {
      $scope.properties.value = true;
    } else {
      $scope.properties.value = false;
    }
  });

  this.name = widgetNameFactory.getName('pbCheckbox');
  this.inputId = widgetNameFactory.getId('pbCheckbox');

  if (!$scope.properties.isBound('value')) {
    $log.error('the pbCheckbox property named "value" need to be bound to a variable');
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy