Answers for "how to pass data to another page in ionic 3"

0

passing data from one page to another in ionic 4

import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
 
@Component({
  selector: 'app-details',
  templateUrl: './details.page.html',
  styleUrls: ['./details.page.scss'],
})
export class DetailsPage implements OnInit {
 
  data: any;
 
  constructor(private route: ActivatedRoute, private router: Router) {
    this.route.queryParams.subscribe(params => {
      if (this.router.getCurrentNavigation().extras.state) {
        this.data = this.router.getCurrentNavigation().extras.state.user;
      }
    });
  }
 
  ngOnInit() { }
}
Posted by: Guest on October-18-2020
0

how to pass data to another page in ionic 3

Controller - 

this.navCtrl.push(page2,{
item:item,
item2:item2
});



View - 

this.value = navParams.get('item');
Posted by: Guest on June-04-2020
0

passing data from one page to another in ionic 4

ionic start academyNavigation blank --type=angular
cd academyNavigation
ionic g page details
Posted by: Guest on October-18-2020

Code answers related to "how to pass data to another page in ionic 3"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language