hi, I wan’t to push ‘medication’ and ‘kg’ to MedPage. I’ve tried it like this but this give’s error:"cannot create property ‘direction’ on number ‘20’ (20 = value for ‘kg’)
import { Component,Input,OnInit } from ‘@angular/core’;
import { NavController, NavParams, ModalController } from ‘ionic-angular’;
import { lftgewPage} from ‘…/lftgew/lftgew’;
import { Medicatie } from ‘…/…/data/medicatie.interface’;
import medicaties from ‘…/…/data/medicatielijst’;
import { MedPage } from ‘…/med/med’;
@Component({
selector: ‘page-medgew’,
templateUrl: ‘medgew.html’,
})
export class MedgewPage implements OnInit {
public kg;
medicatieverzameling: any;
medPage = MedPage;
ngOnInit(){
this.medicatieverzameling = medicaties;
}
constructor(public navCtrl: NavController, public navParams: NavParams,private modalCtrl: ModalController ) {
}
ionViewDidLoad() {
this.kg = this.navParams.get (‘gewicht’);
}
gotoMedPage(medicatie){
this.kg = this.navParams.get (‘gewicht’);
let kg= this.kg;
this.navCtrl.push(MedPage,medicatie,kg);
}
gotolftgewPage(){
let modal=this.modalCtrl.create(lftgewPage);
modal.present();
}
}