title: How to set radio button checked initially in AngularJs?
body: <p>I have created two tabs where the tabs gets navigated by checking radio buttons. One of the two tabs will be active initially but I need to have the corresponding radio button too checked initially.</p>
  
  <pre><code>&lt;div ng-app="myApp"&gt;
    &lt;div class="account-tab-selector" id="tabs" ng-controller="TabsCtrl"&gt;
      &lt;ul&gt;
        &lt;li class="col-sm-6 text-center" ng-repeat="tab in tabs"&gt;
          &lt;label for="{{tab.url}}"&gt;
            &lt;input ng-class="{active:isActiveTab(tab.url)}" ng-click="onClickTab(tab)" type="radio" name="radio" id="{{tab.url}}" ng-model="choice.isSelected" value="true"&gt;{{tab.title}}&lt;/label&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
      &lt;div class="clearfix"&gt;&lt;/div&gt;
      &lt;div id="mainView"&gt;
        &lt;div ng-include="currentTab"&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;script type="text/ng-template" id="one.tpl.html"&gt;
      &lt;div class="customer-reg-form" id="new_customer_form"&gt;
        &lt;div class="sign-up-fb"&gt;
          &lt;a href="#"&gt;&lt;i class="fa fa-facebook" aria-hidden="true"&gt;&lt;/i&gt;
                                      Sign Up With Facebook&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="reg-form"&gt;
          &lt;div class="or-separator"&gt;&lt;span&gt;OR&lt;/span&gt;&lt;/div&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-sm-6 form-group"&gt;
              &lt;label for="fname"&gt;First Name&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group"&gt;
                &lt;input name="firstname" id="fname"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-sm-6 form-group"&gt;
              &lt;label for="lname"&gt;Last Name&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group"&gt;
                &lt;input name="lastname" id="lname"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-sm-6 form-group"&gt;
              &lt;label for="mnumber"&gt;Mobile Number&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group"&gt;
                &lt;input name="mobile-number" id="mnumber"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-sm-6 form-group"&gt;
              &lt;label for="dlocation"&gt;Default Location&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group"&gt;
                &lt;select name="default-location" class="dropstyle"&gt;
                  &lt;option&gt;&lt;/option&gt;
                  &lt;option&gt;Kansas&lt;/option&gt;
                &lt;/select&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-sm-12 form-group"&gt;
              &lt;label for="email"&gt;Email Address&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group"&gt;
                &lt;input name="email" id="email"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-sm-12 form-group"&gt;
              &lt;label for="password"&gt;Password&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group"&gt;
                &lt;input name="password" id="password"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="agreement"&gt;By clicking "Register" below, you are agreeing to our &lt;a href="#"&gt;Terms of Service&lt;/a&gt; agreement.&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/script&gt;
    &lt;script type="text/ng-template" id="two.tpl.html"&gt;
      &lt;div class="customer-reg-form" id="existing_customer_form"&gt;
        &lt;div class="sign-up-fb"&gt;
          &lt;a href="#"&gt;&lt;i class="fa fa-facebook" aria-hidden="true"&gt;&lt;/i&gt;
                                      Login With Facebook&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="reg-form"&gt;
          &lt;div class="or-separator"&gt;&lt;span&gt;OR&lt;/span&gt;&lt;/div&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-sm-12"&gt;
              &lt;label for="mnumber"&gt;Email Address&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;input id="mnumber"&gt;
            &lt;/div&gt;
            &lt;div class="col-sm-12"&gt;
              &lt;label for="mnumber"&gt;Password&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;input id="mnumber"&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="forgot-pwd"&gt;&lt;a href="#"&gt;Forgot Password?&lt;/a&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/script&gt;
  &lt;/div&gt;
  
  
  var app = angular.module("myApp", []);
  app.controller('TabsCtrl', ['$scope', function($scope) {
    $scope.tabs = [{
      title: 'I am a new customer',
      url: 'one.tpl.html',
      isSelected: true
    }, {
      title: 'I have an account',
      url: 'two.tpl.html'
    }];
    $scope.currentTab = 'one.tpl.html';
  
    $scope.onClickTab = function(tab) {
      $scope.currentTab = tab.url;
    };
  
    $scope.isActiveTab = function(tabUrl) {
      return tabUrl == $scope.currentTab;
    };
  }]);
  </code></pre>
  
  <p><a href="http://jsfiddle.net/tdtn2y40/1/" rel="nofollow">Jsfiddle here</a></p>