Yangman - delete_list_item button misses in operations form
[dlux.git] / modules / yangman-resources / src / main / resources / yangman / controllers / form / ym-type-boolean.controller.js
1 define([], function () {
2     'use strict';
3
4     angular.module('app.yangman').controller('YMTypeBooleanCtrl', YMTypeBooleanCtrl);
5
6     YMTypeBooleanCtrl.$inject = ['$scope'];
7
8     function YMTypeBooleanCtrl($scope){
9         var yangTypeBolean = this;
10
11         $scope.$watch('node.value', function(){
12             if ( typeof $scope.node.value !== 'boolean' && $scope.node.value.length) {
13                 $scope.node.value = $scope.node.value === 'true';
14             }
15         });
16     }
17 });
18