0

I am creating a News Reader application using JSON. If I click the item in the list view, Details page is open. In that Details page image, title, and paragraph is placed on that page, as an item in the list view. I got doubt about that 1. If I clicked the item that image, title, and paragraph pass to the other page 2. Pass only id details page using id fetch the image, header, and paragraph help me to solve this

I created Sample app

1 Answer 1

0

You can user Navparams

Example

home.ts

    goToDetail(item){
    this.navCtrl.push(ProductPage, { item: item });
    console.log(ProductPage, { item: item });
}

home.html (give click function)

(click)="goToDetail(item)"

and you can use code

      this.item = this.navParams.get("item");

in bottom constructor

Sign up to request clarification or add additional context in comments.

2 Comments

Please use comments for asking questions. Wait for the comment privilege at 50 to do so. Please improve the rest of your answer by providing the essential parts directly, i.e. not as link.
Please don't just post some tool or library as an answer. At least demonstrate how it solves the problem in the answer itself.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.