2
It seems to be something simple to research, but I’m not getting it. I would like when clicked on a list item, to open a new page with the detailed information of that item, will be the same information used on the home page. But I don’t know how to do that. I created only one page, but I need to receive the content of each item clicked on it.
I made a button and when I click goes to the page, I just need to get the data there. I didn’t post the code because I don’t know exactly what part of the code to post here, but if anyone can help me and need it, just let me know. I want to receive the same information on the second page, but of the selected item. Thanks!
html page1 <ion-item no-lines *ngFor="let produto of produtos" no-padding>
<h3 class="nomproduto"> {{produto.nom_produto}} </h3>
ts page 1
this.navCtrl.push(ConteudoprodutoPage, {valor: "{produto.nom_produto}"} )
ts page 2
export class ConteudoprodutoPage {
valor ="";
constructor(public navCtrl: NavController, public navParams: NavParams) {
this.valor = this.navParams.get("valor");
}
html page 2 <ion-card-header>
{{produto.nom_produto}}
</ion-card-header>
How do you already receive the contents on the list page?
– bfavaretto
Possible duplicate of How to pass data from a selected ng-repeat item to another view
– OnoSendai