title: How to get the boolean value based on radio button selected in html using angular
body: <p>I have created two radio buttons like Order, and Cart as like below, and I just want to get the TRUE (if the radio button is checked and by default Order button is checked) and FALSE if its not checked in app.component.ts file in angular JS.</p>
  
  <p><strong>app.component.html</strong></p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;form&gt;
        &lt;label class="radio-inline"&gt;
          &lt;input type="radio" name="optradio" checked id="place_Oreder"&gt;Order
        &lt;/label&gt;
        &lt;label class="radio-inline"&gt;
          &lt;input type="radio" name="optradio" id="add_cart"&gt;Cart
        &lt;/label&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I just written the following code which say if there is onclick on both button the boolean value will change:</p>
  
  <pre><code>isSelectedMSM:boolean=false;
  isSelectedLive:boolean=false;
  
  $(document).ready(function(){
    $("#place_Oreder").click(function(){
      this.isSelectedOrder=true;
    });
  });
  
  $(document).ready(function(){
    $("#add_cart").click(function(){
      this.isSelectedcart=true;
    });
  });
  </code></pre>
  
  <p>I'm not sure that How can I print TRUE or FALSE in app.components file based on the radio button selected by user based on that I need to put if condition and call an appropriate service to invoke.</p>
  
  <p>Can someone help me to achieve this? I just googled but I didn't find the right resource to implement the same. It would be much helpful if someone share your experience to solve this. </p>
  
  <p><strong>Update:</strong></p>
  
  <p>I'm not sure the above code will work. But can someone lead me that how can I achieve this in better way.</p>