@Dovel wrote:
import { Component } from '@angular/core'; import { NavParams } from '@ionic/angular'; @Component({...}) export class MyPage { constructor( navParams: NavParams ) { console.log(navParams.get('foo')); } }
Result:
No provider for NavParams!
My current solution is to use
router.getCurrentNavigation().extras.state
and pass the data by extras state. But maybe there is a better solution? I want to pass data as body. Not as query params in the url.
Posts: 1
Participants: 1