Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

When i pass data through navCtrl it show me the data as an object on next page

$
0
0

@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>

Captureyyy

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>