Ionic AlertController CSS being removed


#1

Hello,

Well, as you see I’m using the alertController and my issue is that it doesn’t get CSS. I have the alertController on a separate FunctionsProvider so I can call it wherever I like. I’m using no custom CSS. So everything works, but CSS get wacked. Again, no custom CSS used. What do you think is going on?

Ionic --version 3.20.0

functions.ts

import { AlertController } from 'ionic-angular'

export.... (you know whats here)
constructor(private alertCtrl: AlertController) //etc...

powerAlert(tit, sub) {
    let alert = this.alertCtrl.create({
      title: tit,
      subTitle: sub,
      buttons: ['Dismiss']
    });
    alert.present();
  }

/* Example of calling it */
//Importing to Page of course, constructing it

showDetails(foo, bar){
    this.functions.presentAlert(foo, bar)
}

/* HTML */
<ion-item *ngFor='let user of people' (click)="this.showDetails(foo, bar)">
//and some other stuff after

#2

private alertCtrl: AlertController

This should be in the constructor right?


#3

I’m sorry, I thought that would be obvious when I write “You know what’s here” but I’ll change it. Sorry.