Skip to content Skip to sidebar Skip to footer

Why Css Not Working On Ion-header, Ion-toolbar And Ion-icon?

I'm create Ionic 4 angular app, and used css styles on ion-header, ion-toolbar and ion-icon. but css not work as expected ? Here is my stackblitz code

Solution 1:

ts file

you have not include styleUrls, thus styles are not being applied

please add:

styleUrls: ['/home.css']

your config will look like:

@Component({
  selector: 'page-home',
  templateUrl: 'home.html',
  styleUrls: ['home.css']
})

Solution 2:

Use style url properly as styleUrls: ['/home.css'], Your are overriding the build in functionality of ionic and no link of that style file in template

Post a Comment for "Why Css Not Working On Ion-header, Ion-toolbar And Ion-icon?"