@kdefombelle wrote:
I created a new ionic5 project (angular with tabs).
Inside I am trying to open a modal exactly as per the documentation about ion-modal and get:core.js:6014 ERROR Error: Uncaught (in promise): Error: No component factory found for ModalPage. Did you add it to @NgModule.entryComponents?
Error: No component factory found for ModalPage. Did you add it to @NgModule.entryComponents?
at noComponentFactoryError (core.js:25607)
at CodegenComponentFactoryResolver.resolveComponentFactory (core.js:25683)
at CodegenComponentFactoryResolver.resolveComponentFactory (core.js:25680)
at CodegenComponentFactoryResolver.resolveComponentFactory (core.js:25680)I did not find any mention in ionic5 breaking changes
I tried with the Modal declared or not in the module, same result.
I am using the default angular version in use when generating a new ionic5 withionic start
tab2.page.ts
@Component({ selector: "app-tab2", templateUrl: "tab2.page.html", styleUrls: ["tab2.page.scss"], }) export class Tab2Page { constructor(public modalController: ModalController) {} async presentModal() { const modal = await this.modalController.create({ component: ModalPage, }); return await modal.present(); } }
modal.page.ts
@Component({ selector: "modal-page", }) export class ModalPage { constructor() {} }
PS: ionic info
Ionic: Ionic CLI : 6.6.0 (/Users/me/applications/node-v10.15.3-darwin-x64/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.0.7 @angular-devkit/build-angular : 0.803.26 @angular-devkit/schematics : 8.3.26 @angular/cli : 8.3.26 @ionic/angular-toolkit : 2.2.0 Capacitor: Capacitor CLI : 2.0.1 @capacitor/core : 2.0.1 Utility: cordova-res : 0.12.1 native-run : 1.0.0 System: NodeJS : v10.15.3 (/Users/me/applications/node-v10.15.3-darwin-x64/bin/node) npm : 6.14.4 OS : macOS Catalina
Posts: 1
Participants: 1