I have the following code, it checks the value of _meditaTotal if it is greater than 70 the variable icon receives 'green' if it is less than 70 and greater than 50 variable icon receives 'yellow' and if it is less than 50 variable icone gets 'red', but it is showing up just red on the page.
public descritores;
public _mediaTotal: number;
public icone;
constructor(public navCtrl: NavController, public navParams: NavParams) {
this.descritores = navParams.get('anoSelecionado');
this._mediaTotal = this.descritores.icone;
if (this._mediaTotal > 70){
this.icone = 'verde';
}
else if (this._mediaTotal < 70){
this.icone = 'amarelo';
}
else (this._mediaTotal < 50)
this.icone = 'vermelho';
}