title: Return value of an Angular Directive and based on value have ng-if to display content
body: <p>I have a Directive that returns a 0 or 1</p>
  
  <pre><code> &lt;my-code inputcode="{{ data.valBit }}"&gt;&lt;/my-code&gt;
  </code></pre>
  
  <p>So <code>data.valBit</code> will be a 0 or 1</p>
  
  <p>If it is a 1 , then I want it to display an HTML section of code,  how can I do that?  Problem with returning all the html from the directive is that it is put of a form along with ngmessage validation , so it is not fun to pass form or mess with link or compiler</p>
  
  <pre><code>&lt;div ng-if="data.valBit == 1"&gt;
      part of my form,  with ngmessage etc...   $error  etc... 
      .......
  &lt;/div&gt;
  </code></pre>
  
  <p>Is this possible to get a callback from a directive that I can evaluate and decide whether to show or hide a section of html?</p>