title: How can i check radio button by default?
body: <p>On page load i want to show below radio button selected by default i used html attribute but its not working. So on page load I want to show all process radio button checked by default. Is there any other way to achieve this task?</p>
  
  <p>radio.html</p>
  
  <pre><code>&lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;View/Search Inventory&lt;/div&gt;
      &lt;div class="panel-body"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-md-2"&gt;
                  &lt;select kendo-drop-down-list k-data-text-field="'name'"
                      k-data-value-field="'value'" k-data-source="filterOptions"
                      k-ng-model="kfilter" ng-model="filter" ng-change="onChange()"&gt;&lt;/select&gt;
              &lt;/div&gt;
              &lt;div ng-show="filter=='PROCESS'" ng-init="search.showCriteria='allProcess';onChange()"&gt;
                  &lt;div class="col-md-7"&gt;
                      &lt;label class="radio-inline" for="allProcess"&gt; &lt;input
                          type="radio" name="optionsRadios1" ng-value="'allProcess'"
                          id="allProcess" ng-model="search.showCriteria"
                          ng-change="selectSearchType()"&gt; Show All Processes
                      &lt;/label&gt; &lt;label class="radio-inline" for="ratedProcess"&gt; &lt;input
                          type="radio" name="optionsRadios1" ng-value="'ratedProcess'"
                          id="ratedProcess" ng-model="search.showCriteria"
                          ng-change="selectSearchType()"&gt; Show Rated Processes
                      &lt;/label&gt; &lt;label class="radio-inline" for="unratedProcess"&gt; &lt;input
                          type="radio" name="optionsRadios1" ng-value="'unratedProcess'"
                          id="unratedProcess" ng-model="search.showCriteria"
                          ng-change="selectSearchType()"&gt; Show Unrated Processes
                      &lt;/label&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div ng-show="filter=='RISK'"&gt;
                  &lt;div class="col-md-7"&gt;
                      &lt;label class="radio-inline" for="allRisk"&gt; &lt;input
                          type="radio" name="optionsRadios1" ng-value="'allRisk'"
                          id="allRisk" ng-model="search.showCriteria" ng-checked="true"
                          ng-change="selectSearchType()"&gt; Show All Risks
                      &lt;/label&gt; &lt;label class="radio-inline"&gt; &lt;input type="radio"
                          name="optionsRadios1" ng-value="'unalignedRisk'"
                          ng-model="search.showCriteria" ng-change="selectSearchType()"&gt;
                          Show Unaligned Risks
                      &lt;/label&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div ng-show="filter=='CONTROL'"&gt;
                  &lt;div class="col-md-7"&gt;
                      &lt;label class="radio-inline" for="allControl"&gt; &lt;input
                          type="radio" name="optionsRadios1" ng-value="'allControl'"
                          id="allControl" ng-model="search.showCriteria" ng-checked="true"
                          ng-change="selectSearchType()"&gt; Show All Controls
                      &lt;/label&gt; &lt;label class="radio-inline" for="unalignedControl"&gt; &lt;input
                          type="radio" name="optionsRadios1" ng-value="'unalignedControl'"
                          id="unalignedControl" ng-model="search.showCriteria"
                          ng-change="selectSearchType()"&gt; Show Unaligned Controls
                      &lt;/label&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="col-md-2"&gt;
                  &lt;button class="btn btn-default" type="button" ng-click="search(0)"&gt;
                      &lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt; Search
                  &lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="row"&gt;
              &lt;!--&lt;label for="filterBy" class="col-md-1"&gt;Filter by: &lt;/label&gt;
               &lt;div class="col-md-3"&gt;
                      &lt;select kendo-drop-down-list k-data-text-field="'name'" k-option-label="'Select'"
                          k-data-value-field="'value'" k-data-source="filterByOptions"
                          k-ng-model="kfilterBy" ng-model="filterBy" style="width: 100%"&gt;&lt;/select&gt;
              &lt;/div&gt;
              &lt;div class="col-md-3"&gt;
                      &lt;select kendo-drop-down-list k-data-text-field="'name'"
                          k-data-value-field="'value'" k-data-source="filterByValues" k-option-label="'Select'"
                          k-ng-model="kfilterByValue" ng-model="filterByValue" style="width: 100%"&gt;&lt;/select&gt;
              &lt;/div&gt; --&gt;
              &lt;div class="col-md-3"&gt;
                  &lt;a href="" ng-show="!showAdvance" ng-click="advanceFilter()"&gt;Advanced
                      Search&lt;/a&gt; &lt;a href="" ng-show="showAdvance" ng-click="advanceFilter()"&gt;Basic
                      Search&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
                  &lt;!-- &lt;button ng-show="!showAdvance" class="btn btn-default" type="button" ng-click="search()"&gt;Go&lt;/button&gt; --&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
          &lt;form role="form" name="formTimeLine" kendo-validator="validator"
              k-options="myValidatorOptions"&gt;
              &lt;div ng-show="showAdvance"&gt;
                  &lt;div class="clone" ng-repeat="input in inputs"&gt;
                      &lt;br /&gt;
                      &lt;div class="row"&gt;
                          &lt;div class="col-md-1"&gt;
                              &lt;a ng-if="inputs.length &lt; searchOptions.length"
                                  class="add col-md-1" name="addnumadd" ng-click="add($index)"&gt;&amp;nbsp;&lt;/a&gt;
                              &lt;a ng-if="inputs.length &gt;1" class="delete col-md-1"
                                  name="deletenumadd" ng-click="remove($index)"&gt;&amp;nbsp;&lt;/a&gt;
                          &lt;/div&gt;
                          &lt;div class="col-md-3"&gt;
                              &lt;select kendo-drop-down-list k-data-text-field="'name'"
                                  k-option-label="'Select'" k-data-value-field="'value'"
                                  k-data-source="searchOptions" name="searchBy-{{$index}}"
                                  ng-model="input.searchBy"
                                  data-required-msg="Please select the value"
                                  ng-change="clearPreviousValue({{$index}})" data-duplicate=""
                                  style="width: 100%" required&gt;&lt;/select&gt;
                          &lt;/div&gt;
                          &lt;div class="col-md-3"&gt;
                              &lt;input type="text" class="form-control"
                                  ng-model="input.searchValue" placeholder="Enter search item"
                                  ng-maxlength="256" name={{$index}}&gt;
                          &lt;/div&gt;
                          &lt;div class="col-md-4"&gt;
                              &lt;input type="radio" name={{$index}} value="exactMatch"
                                  ng-model="input.exactMatch" data-requiredCheckbox=""&gt;&amp;nbsp;&amp;nbsp;Exact
                              Match &lt;input type="radio" name={{$index}} value="contains"
                                  ng-model="input.exactMatch" data-requiredCheckbox=""&gt;&amp;nbsp;&amp;nbsp;Contains
                              &lt;span class="k-invalid-msg" data-for={{$index}}&gt;&lt;/span&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
      &lt;div id="outergrid" class="row"&gt;
          &lt;ng-include src="gridInclude"&gt;&lt;/ng-include&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>radio.js</p>
  
  <pre><code>    $scope.processSearchOptions = processSearchOptions;
  
  
      $scope.riskSearchOptions = riskSearchOptions;
  
  
      $scope.controlSearchOptions = controlSearchOptions;
  
  
      $scope.filterByOptions = filterByOptions;
  
  
      $scope.filterByValues = filterByValues;
  
      $scope.searchOptions = processSearchOptions;
  
      $scope.onChange = function () {
          var value = $scope.filter;
          $scope.postArgs.page = 1;
          if (value === 'PROCESS') {
              $scope.search.showCriteria = 'allProcess';
              $scope.searchOptions = processSearchOptions;
              $scope.gridInclude = 'views/viewAll/processGrid.html';
          }
          if (value === 'RISK') {
              $scope.search.showCriteria = 'allRisk';
              $scope.searchOptions = riskSearchOptions;
              $scope.gridInclude = 'views/viewAll/riskGrid.html';
          }
          if (value === 'CONTROL') {
              $scope.search.showCriteria = 'allControl';
              $scope.searchOptions = controlSearchOptions;
              $scope.gridInclude = 'views/viewAll/controlGrid.html';
          }
          $scope.showAdvance = false;
          $scope.clearAdvFilter();
          $scope.postArgs = {
              page: 1
          };
      };
      //initialize process grid
      initializeGrid('process');
      $scope.processGridOptions = getProcessGridOptions($scope.postArgs, gridColumns.processGridColumns);
      $scope.processInnerGridOptions = viewSearchInvService.getInnerProcessGrid;
  
      //initialize risk grid
      initializeGrid('risk');
      $scope.riskGridOptions = getProcessGridOptions($scope.postArgs, gridColumns.riskGridColumns);
  
      $scope.riskInnerGridOptions = viewSearchInvService.getInnerRiskGrid;
  
      //initialize control grid
      initializeGrid('control');
      $scope.controlGridOptions = getProcessGridOptions($scope.postArgs, gridColumns.controlGridColumns);
  
      $scope.controlInnerGridOptions = viewSearchInvService.getInnerControlGrid;
  
  
      $scope.ProcessEditHandler = function (id) {
          ViewEditPrcsService.saveProcessId(id);
      };
      $scope.RiskEditHandler = function (id) {
          ViewEditRiskService.saveRiskId(id);
      };
      $scope.advanceFilter = function () {
          if ($scope.showAdvance) {
              $scope.clearAdvFilter();
              $scope.showAdvance = false;
          } else {
              $scope.showAdvance = true;
          }
      };
      $scope.clearAdvFilter = function () {
          $scope.inputs = [];
          $scope.inputs.push(getNewObject());
      };
      $scope.search = function () {
          if ($scope.validator.validate() || !$scope.showAdvance) {
              searchCriteria(1);
              searchFlag = true;
              if ($scope.filter === 'PROCESS') {
                  $scope.search.process.dataSource.read();
              }
              if ($scope.filter === 'RISK') {
                  $scope.search.risk.dataSource.read();
              }
              if ($scope.filter === 'CONTROL') {
                  $scope.search.control.dataSource.read();
              }
          }
      };
  
      $scope.selectSearchType = function () {
          $scope.clearAdvFilter();
          $scope.showAdvance = false;
          $scope.search();
      };
  
      $scope.add = function () {
          $scope.inputs.push(getNewObject());
      };
      $scope.remove = function (index) {
          $scope.inputs.splice(index, 1);
      };
  
      $scope.myValidatorOptions = {
          rules: {
              duplicate: function (input) {
                  return checkDuplicates(input.val(), input[0].name);
              },
              requiredCheckbox: function (input) {
                  return !(input[0].type === 'radio' &amp;&amp; !$scope.inputs[input[0].name].exactMatch &amp;&amp; !$scope.inputs[input[0].name].contains);
              }
          },
          messages: {
              duplicate: 'Option already selected. please select another option',
              requiredCheckbox: 'Operator is required'
          }
      };
  
      $scope.clearPreviousValue = function (index) {
          $scope.inputs[index].searchValue = '';
      };
  });
  </code></pre>