I need to create a popover menu ,but it triggers an error
error : PopoverCmp ionViewPreLoad error: No component factory found for PopoverPage
cheval.ts
@Component({
template: `
<ion-list>
<ion-list-header>Ionic</ion-list-header>
<button ion-item >Learn Ionic</button>
<button ion-item >Documentation</button>
<button ion-item >Showcase</button>
<button ion-item >GitHub Repo</button>
</ion-list>
`
})
export class PopoverPage {
constructor(private navParams: NavParams) {}
}
@Component({
selector: 'page-cheval',
templateUrl: 'cheval.html'
})
export class ChevalPage {
@ViewChild('popoverContent', { read: ElementRef }) content: ElementRef;
@ViewChild('popoverText', { read: ElementRef }) text: ElementRef;
presentPopover(ev) {
let popover = this.popoverCtrl.create(PopoverPage);
popover.present({
ev: ev
});
}
}
cheval.html
<button ion-button (click)="presentPopover($event)"s>
<ion-icon name="search"></ion-icon>
</button>
</ion-buttons>