question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[4.0.0-rc.1] Modal shows up when not presented

See original GitHub issue

Bug 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 add ModalPage to entryComponents
  • Uncomment entryComponents: [ModalPage] from app/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 from app/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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rdlabocommented, Jan 15, 2019

@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) .

1reaction
YDrogencommented, Jan 15, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found