title: how can we manage multiple conditions in a simple condition using ng-show and ng-hide
body: <p>I am trying to improve multiple conditions using ng-show and ng-hide using directives, here is my code</p>
  
  <p><strong>html code</strong></p>
  
  <pre><code> &lt;my-directive controls="a,b,c"&gt;&lt;/my-directive&gt;
  </code></pre>
  
  <p><strong>js code</strong></p>
  
  <pre><code>.directive('myDirective',function(){
    return{
      restrict:'E',
      templateUrl:"parentHtml.html",
      link:function(scope,elem,attr){
        var options = attr.controls;
        if(options=="a,b,c"){
          scope.showMeAll=true;
        }else if(options=="a"){
          scope.showmeA=true;
        }else if(options=="b"){
          scope.showmeB=true;
        }else if(options=="c"){
          scope.showmeC=true;
        }
      }
    }
  }).directive('subDirective',function(){
    return{
      restrict:'E',
      template:"&lt;h2&gt;aapple&lt;/h2&gt;",
      link:function(scope,elem,attr){
  
      }
    }
  }).directive('subDirective1',function(){
    return{
      restrict:'E',
      template:"&lt;h2&gt;BBatt&lt;/h2&gt;",
      link:function(scope,elem,attr){
  
      }
    }
  }).directive('subDirective2',function(){
    return{
      restrict:'E',
      template:"&lt;h2&gt;CCat&lt;/h2&gt;",
      link:function(scope,elem,attr){
  
      }
    }
  });
  </code></pre>
  
  <p><strong>here is my parentHtml.html code</strong></p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div ng-show="showMeAll"&gt;
      &lt;sub-directive&gt;&lt;/sub-directive&gt;
      &lt;/div&gt;
     &lt;div ng-show="showMeB"&gt;
      &lt;sub-directive1&gt;&lt;/sub-directive1&gt;
      &lt;/div&gt;
      &lt;div ng-show="showMeC"&gt;
      &lt;sub-directive2&gt;&lt;/sub-directive2&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My problem is when I give all the three "a,b,c" to the directive attribute then in "parentHtml" all the three div's have to show, if I give only two i.e "a,b" then in parentHtml only two div's have to show i.e "apple" and "bat" and also if give only one string i.e "c" then in parentHtml only "cat" div have to show, in a simple way if what the alphabet I give to the directive attribute thet div have to show. Here is my <a href="http://plnkr.co/edit/6gAyAi63Ni4Z7l0DP5qm?p=preview" rel="nofollow">http://plnkr.co/edit/6gAyAi63Ni4Z7l0DP5qm?p=preview</a>. 
   Please solve my question in a simple way. </p>
  
  <p>Thanks In Advance</p>