@FK2193 wrote:
my question is after adding patient data and then passing that data as an object on the next page and then when I save that object in the database it gives me an error like this object(…) is not a function ionic, so how can I resolve that issue?
**Move data from Patient to Medicine Page then Medicine to Schedule **
patient:Patient; export class AddPatientPage { AllPatient:any; constructor(public navCtrl: NavController, private databasedata: DatabasedataProvider, public loadincontroller:LoadingController,public navParams: NavParams) { this.patient=new Patient(this.id,this.name,this.doctor_name,this.hospital_clinic,this.date,'pending'); this.AllPatient=this.patient; } patientadd() { this.navCtrl.push(MedicinedisplayPage, {patientdata: this.AllPatient}); }
MedicineDisplay.ts page
patientdata:string; constructor(public navCtrl: NavController, public loadingcontroller:LoadingController, public medService: MedicineServicerProvider, public Alert:AlertController,public navParams: NavParams, public toast:ToastController) { this.patientdata=this.navParams.get("patientdata"); }
Medicinedisplay.html
<div> <h5>Parameters passed:</h5> <pre style="background-color: #f8f8f8">selections: [ {{patientdata}} ]</pre> </div>
Posts: 6
Participants: 2