<commit_before>/**
@ngdoc directive
@name umbraco.directives.directive:umbCheckbox
@restrict E
@scope

@description
<b>Added in Umbraco version 7.14.0</b> Use this directive to render an umbraco checkbox.

<h3>Markup example</h3>
<pre>
    <div ng-controller="My.Controller as vm">

        <umb-checkbox
            name="checkboxlist"
            value="{{key}}"
            model="true"
            text="{{text}}">
        </umb-checkbox>

    </div>
</pre>

@param {boolean} model Set to <code>true</code> or <code>false</code> to set the checkbox to checked or unchecked.
@param {string} id Set the id of the checkbox.
@param {string} value Set the value of the checkbox.
@param {string} name Set the name of the checkbox.
@param {string} text Set the text for the checkbox label.
@param {string} serverValidationField Set the val-server-field of the checkbox.
@param {boolean} disabled Set the checkbox to be disabled.
@param {boolean} required Set the checkbox to be required.
@param {string} onChange Callback when the value of the input element changes.

**/

(function () {
    'use strict';
    
    
    function UmbCheckboxController($timeout) {
        
        var vm = this;
        
        vm.callOnChange = function() {
            $timeout(function(){
                vm.onChange({model:vm.model, value:vm.value});
            }, 0, false);
        }
        
    }
    
    
    var component = {
        templateUrl: 'views/components/forms/umb-checkbox.html',
        controller: UmbCheckboxController,
        controllerAs: 'vm',
        bindings: {
            model: "=",
            id: "@",
            value: "@",
            name: "@",
            text: "@",
            serverValidationField: "@",
            disabled: "<",
            required: "<",
            onChange: "&"
        }
    };

    angular.module('umbraco.directives').component('umbCheckbox', component);

})();
<commit_msg>umb-checkbox callback should call a new digest for callbacks changes to take effect.<commit_after>/**
@ngdoc directive
@name umbraco.directives.directive:umbCheckbox
@restrict E
@scope

@description
<b>Added in Umbraco version 7.14.0</b> Use this directive to render an umbraco checkbox.

<h3>Markup example</h3>
<pre>
    <div ng-controller="My.Controller as vm">

        <umb-checkbox
            name="checkboxlist"
            value="{{key}}"
            model="true"
            text="{{text}}">
        </umb-checkbox>

    </div>
</pre>

@param {boolean} model Set to <code>true</code> or <code>false</code> to set the checkbox to checked or unchecked.
@param {string} id Set the id of the checkbox.
@param {string} value Set the value of the checkbox.
@param {string} name Set the name of the checkbox.
@param {string} text Set the text for the checkbox label.
@param {string} serverValidationField Set the val-server-field of the checkbox.
@param {boolean} disabled Set the checkbox to be disabled.
@param {boolean} required Set the checkbox to be required.
@param {string} onChange Callback when the value of the input element changes.

**/

(function () {
    'use strict';
    
    
    function UmbCheckboxController($timeout) {
        
        var vm = this;
        
        vm.callOnChange = function() {
            $timeout(function() {
                vm.onChange({model:vm.model, value:vm.value});
            }, 0);
        }
        
    }
    
    
    var component = {
        templateUrl: 'views/components/forms/umb-checkbox.html',
        controller: UmbCheckboxController,
        controllerAs: 'vm',
        bindings: {
            model: "=",
            id: "@",
            value: "@",
            name: "@",
            text: "@",
            serverValidationField: "@",
            disabled: "<",
            required: "<",
            onChange: "&"
        }
    };

    angular.module('umbraco.directives').component('umbCheckbox', component);

})();

{'fraction_non_alphanumeric': 0.12541507024265644, 'fraction_numerical': 0.0035759897828863347, 'mean_word_length': 2.255195344970906, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6207223', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1110, 'n_words': 339}