angular-boolean-translator

1.1.1 • Public • Published

angular-booleanTranslator

Simple directive that can be bound to a condition and used to show static text or to collect a boolean value using radio buttons.

Usage

boolean-translator

angular.module('testModule', ['angular-booleanTranslator']);
 
angular.module('testController', function($scope) {
  $scope.testCondition = true;
});
<div ng-controller="testControler">
  <boolean-translator condition="testCondition"></boolean-translator>
</div>

boolean-input

<boolean-input ng-model="testInput" name="myInput"></boolean-input>

This will render in a top down format.

To render in a spread format:

<boolean-input ng-model="testInput" name="myInput" layout="spread"></boolean-input>

Alternatively, you can provide true-text and false-text to override the default values which are Yes/No.

Package Sidebar

Install

npm i angular-boolean-translator

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • mqkalish