I am using ionic 4. It does not accept to receive data using navparams. Here is my sender page method:
//private route:Router
gotoFinalView(intent) {
This is how I solved my problem:
I created a Service with a setter and getter methods as;
import { Injectable } from "@angular/core";
@Injectable({
providedIn: "root"
})
export class MasterDetailService {
private destn: any;
constructor() {}
public setDestn(destn) {
this.destn = destn;
}
getDestn() {
return this.destn;
}
}
Injected the Service and NavController in the first page and used it as;
gotoFinalView(destn) {
this.masterDetailService.setDestn(destn);
this.navCtrl.navigateForward("destn-page");
}
Extracted the data at the final page by;
constructor(
private masterDetailService: MasterDetailService
) {
this.destination = this.masterDetailService.getDestn();
}