angular 2 - how to hide nav bar in some components : <p>I am created nav bar separately in nav.component.html ,how to hide nav bar in some components like login.component.</p>

<blockquote>
  <p>nav.component.html</p>
</blockquote>

<pre><code>&lt;nav class="navbar navbar-default navbar-fixed-top navClass"&gt;
    &lt;div class="container-fluid"&gt;
        &lt;div class="navbar-header"&gt;
                &lt;button type="button" class="navbar-toggle collapsed"
                        (click)="toggleState()"&gt;
                &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                &lt;span class="icon-bar"&gt;&lt;/span&gt;
                &lt;span class="icon-bar"&gt;&lt;/span&gt;
                &lt;span class="icon-bar"&gt;&lt;/span&gt;
            &lt;/button&gt;

        &lt;/div&gt;
         &lt;div class="collapse navbar-collapse"
              [ngClass]="{ 'in': isIn }"&gt;
          enter code here   &lt;ul class="nav navbar-nav"&gt;
               &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
               &lt;li&gt;&lt;a href="#"&gt;about&lt;/a&gt;&lt;/li&gt;

            &lt;/ul&gt;

        &lt;/div&gt;
    &lt;/div&gt;
&lt;/nav&gt;
</code></pre>
