title: Angular 2/4, "ngStyle". Apply different style depeding its father element active o inactive
body: <p>I need to apply a style to an element when it parent element is actived. I'm using routerLinkActive to apply CSS Class and works fine, but deppending if the father element is actite apply one inline style (display: block), in other cases apply another (display: none).</p>
  
  <p>If parent element is active:</p>
  
  <pre><code>&lt;li class="active"&gt;
     &lt;ul class="sub-menu" style="display: block;"&gt;
  &lt;/li&gt;
  &lt;li&gt;
     &lt;ul class="sub-menu" style="display: none;"&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>When I choose another element:</p>
  
  <pre><code>&lt;li&gt;
     &lt;ul class="sub-menu" style="display: none;"&gt;
  &lt;/li&gt;
  &lt;li class="active"&gt;
     &lt;ul class="sub-menu" style="display: block;"&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I have an extended list of items with their respectives Links. Each "sub-menu" has its own list of elements.</p>