Use ionic5 pop-up box with the following code:
const modal = await this.modalController.create({
component: MyComponent,
componentProps: {
title: option.title || '',
},
cssClass: 'my-custom-class'
});
await modal.present();
const { data } = await modal.onDidDismiss();
return data;
Then there is an ngIf directive in MyComponent, run the error:
Can't bind to 'ngIf' since it isn't a known property
The reason:
Angular routes are not loaded into MyComponent’s Module
Solutions:
1. Import the module of MyComponent in app.module.ts
2. Import the module where the MyComponent resides in the module.ts of the page that uses the pop-up box
Read More:
- Solve angular’s cannot find module ‘@ angular devkit / core’ problem
- [$ injector:unpr ] Unknown provider:–angular.module () function solution
- ionic4- error TS2307: Cannot find module ‘rxjs-compat/Observable’
- ionic Uncaught (in promise): Error: StaticInjectorError[NavController]
- When angular4.0 starts the project, an error is reported: the “@ angular / compiler cli” package was not properly installed
- Angular Error You seem to not be depending on “@angular/core“ and/or “rxjs“. (Fixed)
- ionic android Current working directory is not a Cordova-based project.
- Angular $ injector:unpr Unknown Provider Error Fixed
- When using ionic to build Android APK, Cordova error is reported: requirements check failed for JDK 1.8 or greater
- ionic3 Error cordovaProject.projectConfig.getFileResources is not a function
- Ionic1 compiling IOS encountered * * archive failed * * cordovaerror: promise rejected with non error: ‘error code 65 f
- Local workspace file (‘angular.json’) could not be found.
- Angular: Program ng failed to run No application is associated
- Angular error – can’t resolve all parameters for []
- angular.js Error:[$ injector:modulerr ]Why
- [solution] a perfect solution to the problem of failed to load module “Canberra GTK module” in Ubuntu
- Unable to call numpy in pychar, module notfounderror: no module named ‘numpy’
- Unable to read workspace file ‘D:\angular.json‘: Invalid JSON character: “ “ at
- Cannot find module ‘.. / lib / utils / unsupported. JS’ problem in installing node in centos7