title: Changing background colour of ion-navbar using *ngIf
body: <p>Using ion-navbar and Firebase Database.</p>
  
  <p>What I would like to see is that according to the "color" child in the Firebase DB, a different ion-navbar background colour would be shown. </p>
  
  <p>I'm currently using *ngIf to work out my problem, but I can't get it to function. It keeps showing me a blue background (#85dec8, the last *ngIf statement) regardless of the color of this.selectedItem.color. </p>
  
  <p>My code: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>   &lt;ion-navbar class="bar"&gt;
      &lt;ion-title class="bar"&gt;{{selectedItem.name}}&lt;/ion-title&gt;
      &lt;style *ngIf="selectedItem.color=='#ffce4e'"&gt;
        .bar {
          background-color: #ffce4e;
        }
      &lt;/style&gt;
      &lt;style *ngIf="selectedItem.color=='#f55f7c'"&gt;
          .bar {
            background-color: #f55f7c;
          }
      &lt;/style&gt;
      &lt;style *ngIf="selectedItem.color=='#85dec8'"&gt;
          .bar {
            background-color: #85dec8;
          }
      &lt;/style&gt;
    &lt;/ion-navbar&gt;
    </code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help would be appreciated!</p>