title: How do I use a variable in Js controller to my HTML
body: <p>I want to validate my form with ng-disable.  </p>
  
  <p>So my function will check if the ID the user entered is correct.<br>
  Also I will have to check my form if all the inputs are filled up.</p>
  
  <p>This is my Function: </p>
  
  <pre><code>vm.validateid = function(){
      console.log('here');
      var objvar = {
          'id': vm.data.referalid,
          'referral2': true,
      };
  
      $http.post(ConfigCnst.restUrl,objvar).then(function(res) {
          if (res.data.status !== true) {   
  
               alert('Invalid ID');
               vm.data.referalName = 'Invalid ID';
               vlid = res.data.status;
               console.log(vlid);
  
          } else {
  
              alert('ID Validated');
              vm.data.referalName = JSON.stringify(res.data.data.name);
              vlid = res.data.status;
              console.log(vlid);
          }
  
      });
  }
  </code></pre>
  
  <p>I want to take <code>vlid</code>. It will either contain true or false.</p>
  
  <p>This is my ng-disable:</p>
  
  <pre><code> &lt;button ng-disabled="registerForm.$invalid" 
           ng-click="register.submit()"  
           class="button button-block button-positive"&gt;Confirm&lt;/button&gt;
  </code></pre>
  
  <p>I want to check both <code>registerForm</code> and <code>vlid</code> as both false.<br>
  Is there a way to reference my <code>vlid</code> from my controller?</p>