title: ng-init with condition statements
body: <p>I have a Angular JS  Application,</p>
  
  <pre><code>&lt;div class="col-lg-12" ng-init="getTableData('{{URL::route('get_repair_category')}}')"&gt;
  </code></pre>
  
  <p>When Page loading the getTableData will execute, but I want to check a variable <strong>$rootScope.Dealer</strong> and switch the function name of initialization.</p>
  
  <p>Eg : if <strong>$rootScope.Dealer</strong> value present I wanto execute the function named <strong>getDealerData</strong></p>
  
  <p>And If the value is not set need to execute the <strong>getTableData</strong> function.</p>
  
  <p>How can I make this in anglar js template.</p>
  
  <p>I just tried the ng-if, but its not working...</p>