I’m creating a popover on one Page when clicking on a label. It should open there and it worked while using tabs as navigation. Now i changed the tab navigation from the tab.module to the app-routing.module, because I want the tabs to show on every page. Now when I’m clicking on the label (“bewertung”) to open the popover (“rateus”) it doesn’t show at the 5th tab (“more”), where it should open but when i navigate to the 1st tab (“home”) it is opened there and i cant interact with it.
more.page.ts
import { Component, OnInit } from '@angular/core';
import { ModalController, NavController, PopoverController } from '@ionic/angular'
import { RateusPage } from 'src/app/popover/rateus/rateus.page';
@Component({
selector: 'app-more',
templateUrl: './more.page.html',
styleUrls: ['./more.page.scss'],
})
export class MorePage implements OnInit {
constructor(
private popoverController: PopoverController,
private modalController: ModalController
) { }
ngOnInit() {
}
async presentPopover() {
console.log('I got clicked')
const popover = await this.popoverController.create({
component: RateusPage,
});
popover.present();
}
}
rateus.page.html
<ion-item>
<ion-label>
Bewertung
</ion-label>
</ion-item>
<ion-content padding>
<ion-button expand="full" (click)=rateusDismiss()>Close</ion-button>
</ion-content>
rateus.page.ts
import { Component, OnInit } from '@angular/core';
import { PopoverController } from '@ionic/angular';
@Component({
selector: 'app-rateus',
templateUrl: './rateus.page.html',
styleUrls: ['./rateus.page.scss'],
})
export class RateusPage implements OnInit {
constructor(private popoverController: PopoverController) { }
ngOnInit() {
}
rateusDismiss(){
console.log("dismiss")
this.popoverController.dismiss();
}
}
1 post - 1 participant