title: How to use multiple conditions in *ngIf directive with or` || operator Angular 4
body: <p>I have navbar which must change elements when user or admin logging in. After authentication I need that some elements were changed.For that I use ngIf directive.
  This is my navbar template.</p>
  
  <pre><code>&lt;nav class="navbar navbar-expand-lg navbar-dark bg-dark"&gt;
    &lt;a class="navbar-brand" href="#"&gt;MEAN&lt;/a&gt;
    &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation"&gt;
      &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
    &lt;/button&gt;
  
    &lt;div class="collapse navbar-collapse" id="navbarColor02"&gt;
      &lt;ul class="navbar-nav mr-auto"&gt;
        &lt;li class="nav-item active" *ngIf="!auth.loggedIn() || !admin.loggedIn()"&gt;
          &lt;a class="nav-link" routerLink = "/"&gt;Home&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="!auth.loggedIn() || !admin.loggedIn()"&gt;
          &lt;a class="nav-link" routerLink = "/login"&gt;Login&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="!auth.loggedIn() || !admin.loggedIn()"&gt;
          &lt;a class="nav-link" routerLink = "/register" &gt;Register&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="auth.loggedIn()"&gt;
          &lt;a class="nav-link" routerLink = "/dashboard"&gt;Dashboard&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="auth.loggedIn()"&gt;
          &lt;a class="nav-link" routerLink = "/edit"&gt;Edit User&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="auth.loggedIn()"&gt;
          &lt;a class="nav-link" (click)="logout()"&gt;Logout&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="admin.loggedIn()"&gt;
          &lt;a class="nav-link" routerLink = "/adminPage"&gt;Edit Users&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="nav-item" *ngIf="admin.loggedIn()"&gt;
          &lt;a class="nav-link" (click)="logout()"&gt;Logout&lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>I have two services for handling users and admins pages.These services have functions which checks for token existence in local storage.
   This is functions from user service</p>
  
  <pre><code>loggedIn(){
      if(localStorage.getItem("authToken")){
        return true;
      }else{
        return false;
      }
    }
  </code></pre>
  
  <p>And this one from admin service</p>
  
  <pre><code>loggedIn(){
    if(localStorage.getItem("adminToken")){
      return true;
    }else{
      return false;
    }
  }
  </code></pre>
  
  <p>So I need that when user or admin logging in some of elements were hide (home,register,login)</p>
  
  <pre><code>&lt;li class="nav-item active" *ngIf="!auth.loggedIn() || !admin.loggedIn()"&gt;
              &lt;a class="nav-link" routerLink = "/"&gt;Home&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class="nav-item" *ngIf="!auth.loggedIn() || !admin.loggedIn()"&gt;
              &lt;a class="nav-link" routerLink = "/login"&gt;Login&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class="nav-item" *ngIf="!auth.loggedIn() || !admin.loggedIn()"&gt;
              &lt;a class="nav-link" routerLink = "/register" &gt;Register&lt;/a&gt;
            &lt;/li&gt;
  </code></pre>
  
  <p>for that I've tried  to use or operator in ngIf directive but both of conditions not works.Sorry for language mistakes and Thanks for help </p>