It seems like something simple to search, but I can not. I would like to when clicked on an item in the list, open a new page with the detailed information of that item, it will be the same information used on the homepage. But I do not know how I can do this. I created a page only, but I need to get the contents of each item clicked on it.
ImadeabuttonandwhenIclickgotothepage,Ijustneedtoreceivethedatathere.IdidnotpostthecodebecauseIdonotknowexactlywhichpartofthecodetoposthere,butifsomeonecanhelpmeandneedit,justtellme.Iwanttoreceivethesameinformationonthesecondpage,buttheselecteditem.Thanks!
htmlpage1<ion-itemno-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>