[4.0.0-rc.1] Modal shows up when not presented
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: Modal page shows up even when not presented.
Expected behavior: Modal page should only show up when presented.
Steps to reproduce: Here’s a repo: https://github.com/YDrogen/capacitor-issue-android-modal (Don’t mind the repo name - bug might not come from Capacitor)
ng serve
- Go to the browser and click on
OPEN MODAL
- Ionic asks to addModalPage
toentryComponents
- Uncomment
entryComponents: [ModalPage]
fromapp/home/home.module.ts
- Go back to the browser and click on
OPEN MODAL
- It works! - Use Capacitor for Android to compile and starts it in debug mode - Capacitor logs:
Component ModalPage is not part of any NgModule or the module has not been imported into your module.
- Uncomment
ModalPageModule
fromapp/home/home.module.ts
- If you go back to the browser, the modal always shows up. Same problem if you rebuild and recompile for Android
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.3.1 (C:\Users\YDrogen\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-rc.1
@angular-devkit/build-angular : 0.11.4
@angular-devkit/schematics : 7.1.4
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.2.2
System:
NodeJS : v8.9.1 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
[4.0.0-rc.1] Modal shows up when not presented · Issue #17098
Go back to the browser and click on OPEN MODAL - It works! Use Capacitor for Android to compile and starts it in...
Read more >Bootstrap modal appearing under background - Stack Overflow
js (and not bootstrap-modal.js). However, my modal is appearing underneath the grey fade (backdrop) and is non editable. Here's what it looks like:....
Read more >Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >Clicking to open modal - CodeSandbox
Clicking to open modal. Using antd to create a table and clicking table row to open a modal and highlight the row clicked....
Read more >News - qBittorrent
0rc1. This build is considered experimental compared to the Qt5 one. v4.3.9 changelog: BUGFIX: Fix "no action" option on torrent double ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@YDrogen modal.module.ts can’t have router. https://github.com/YDrogen/capacitor-issue-android-modal/blob/master/src/app/modal/modal.module.ts#L10-L15
You should remove
RouterModule.forChild(routes)
.Thanks! Been on this issue for a while, I didn’t knew that it would override, I just used
ionic generate
for these modals and didn’t found any documentation about this! Sorry for the inconvenience!