Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

638
Views
Passing data to a component from ModalController.create()

Is there a way that I can pass this itemId parameter so that the MarketPlaceItemPage can use that data?

async presentMarketplaceItem(itemId: number) {
    const modal = await this.modalController.create({
      component: MarketplaceItemPage,
      cssClass: '',
      mode: 'ios',
    });
    return await modal.present();
  }

I'm just not finding what I need in the Ionic documentation. Thanks in advance!

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Here is the official documentation from Ionic

The property you are looking for is componentProps. Ionic controllers are not listed in their v5 documentation but their were listed under v4.

Another way (faster IMO) is to directly browse sources (ctrl+click), it will show you the controller method signature.

over 4 years ago · Santiago Trujillo Report

0

I found something that works from this website https://www.freakyjolly.com/ionic-modal-popovers-pass-receive-data/

async presentMarketplaceItem(itemId: number) {
    const modal = await this.modalController.create({
      component: MarketplaceItemPage,
      componentProps:{
        id: itemId
      },
      cssClass: '',
      mode: 'ios',
    });
    return await modal.present();
  }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!