How to set radio button default checked and run the function on page load?
<p>I have a modal window where i have one radio button with current code when i select the radio button it loads the data, How can i set default value checked for radio button and load the <code>toggleChange()</code> method on page load ?</p>

<p>main.html</p>

<pre><code>&lt;div class="col-md-5"&gt;
                &lt;input type="radio"
                    name="optionsRadios" id="unrated" ng-value="'assign'" checked="checked"
                    ng-model="nonPersistentProcess.showCriteria" ng-init="toggleChange()"&gt;
                    &lt;strong&gt;Show all available controls that are not aligned to this risk&lt;/strong&gt;
            &lt;/div&gt;
</code></pre>

<p>main.js</p>

<pre><code>  $scope.toggleChange = function() {
                if ($scope.nonPersistentProcess.showCriteria === 'disassign') {
                    $scope.controlRiskGridOption = riskToControlGridDataService.getControlsInProcess();
                    $scope.controlRiskGridOption.dataSource = riskToControlGridDataService.getControlsInProcessGridDataSource($stateParams.processId, $scope.nonPersistentProcess.riskKey);
                } else if ($scope.nonPersistentProcess.showCriteria === 'assign') {
                    $scope.controlRiskGridOption = riskToControlGridDataService.getAllControls($scope);
                    $scope.controlRiskGridOption.dataSource = riskToControlGridDataService.getAllControlsGridDataSource($stateParams.processId, $scope.nonPersistentProcess.riskKey);
                }
                $scope.selectedFlagControlInProcess = true;
                $scope.selectedTypeProcess = new Date().getTime();
                $scope.controlInPrcsSelected = {};
                $scope.controlInPrcsNoAlignSelected = {};
                $scope.controlInPrcsSelectedArray = {};
                $scope.controlInPrcsNoAlignSelectedArray = {};
            };
</code></pre>