Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Dynamically change navbar color

$
0
0

@yannickvg wrote:

Hi,

I'm trying to dynamically style the nav-bar of the ionic 2 app i'm writing.

<ion-navbar class="girl" *navbar>
    <ion-title>Hallo {{userName}}!</ion-title>
</ion-navbar>

In css I have the class:

.girl {
  background-color: #E91E63;
}

This works fine for a button or any other element, but the navbar flashes purple briefly and then goes back to the default color. I''ve tried adding the class in "onPageDidEnter()" but this does not work.

Any help to get me on the right track would be appreciated.

Thanks !

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>