Sankar
Sankar

Reputation: 23

how to change background color in side menu in ionic3?

Change side menu background color and add an icon in side menu in ionic3. I tried to change side menu background color but it didn't change and where I have added icon in the side menu.

Upvotes: 0

Views: 917

Answers (1)

vaibhav pancholi
vaibhav pancholi

Reputation: 51

well you just have to add "ion-icon" tag before your menu text just like this

<ion-content id="mysidemnu">
    <ion-list >
        <button ion-item *ngFor="let p of pages" (click)="openPage(p)">
          <ion-icon ios="ios-alert" md="md-alert"></ion-icon> {{p.title}}
        </button>
    </ion-list>
</ion-content>

and as for the background color, you just have to give an id to the "ion-content" and give the case to the success file just like this

#mysidemnu
{
    background-color: red;
}

Upvotes: 1

Related Questions