This is a copy of a StackOverflow post , I’m hoping the Ionic forums might be a better place to ask for help. I’m on 3.5.3 and trying to re-use angular components as ionic tabs ( with lazy loading ). I’m trying to provide @Input attributes to the tabs but all I’ve been able to find is rootParams which provides the data via NavParams, I’m wondering if there’s a way to provide attributes so that the @Input binding will work as it normally does in ng4, preferably without needing to inject and deal with the NavController in the constructor.
Original question -
I’m on ionic 3.5.3 and I’m wondering if I’ve missed something in the ion-tab specs.
I know you can provide data via rootParams to the navController of the target state but as I’m lazy-loading components I wanted to provide data that would be bound to @Input on the target component thus allowing it to be any comoponent. Is this not possible?
For example I can use the component within other pages like this
but I would also like to navigate to the component directly in an ion-tab using
<ion-tabs> <ion-tab [tabUrlPath]="mycomponent" [root]="'my-component'" [boundData]="boundData" </ion-tab> </ion-tabs>
This doesn’t work as boundData is not recognized as a template input for ion-tab. I’m wondering if I’ve missed some way of providing a set of @inputs?