I have a screen filled up with different boxes that represent different sectors, all sectors have different sub sectors.
I am trying to click on one of the sectors so that I can go to that particular sector's details.
These details are presented in slides.
For each sector i have an ion-slide
, in each slide there is a list of the sub sectors.
I have the below code to take me to the chosen sector's slide(from box).
It is giving me this error:
Property 'parent' does not exist on type 'NavController'.
I tried using something else but I couldn't find anything. PLEASE HELP
@Component({
selector: 'app-tile',
templateUrl: './tile.component.html',
styleUrls: ['./tile.component.scss'],
})
export class TileComponent implements OnInit {
@Input() tileData: superSectorPassClass;
@Input() superSectorIcon: string;
constructor(private navCtrl: NavController, private events: Events, public globalVariableService: GlobalVariableServiceProvider) {
}
goToSlide(slideID: number) {
this.globalVariableService.comesFromTileClick = true;
console.log('this.globalVariableService.comesFromTileClick: ' + this.globalVariableService.comesFromTileClick);
this.navCtrl.parent.select(1).then(() => {
this.events.publish('go-to-slide', 1, slideID - 1);
console.log('Published');
});
}