Skip to content

fix(angular): run change detection on attached overlay views#31235

Merged
ShaneK merged 1 commit into
mainfrom
fix/31220-modal-signal
Jun 18, 2026
Merged

fix(angular): run change detection on attached overlay views#31235
ShaneK merged 1 commit into
mainfrom
fix/31220-modal-signal

Conversation

@ShaneK

@ShaneK ShaneK commented Jun 18, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #31220


What is the current behavior?

Currently, a component opened through ModalController that binds a value from componentProps in its template, like <ion-nav [root]="rootPage()">, can render empty. attachView only runs the creation pass, so the [root] binding is applied on a later tick, after ion-nav has already finished loading and read root as undefined. Wrapping the nav in @if (rootPage()) worked around it.

What is the new behavior?

After this fix, attachView runs detectChanges() on the view right after attaching it, so template bindings apply before the web component loads. ion-nav now sees its root during load and renders it. This matches the detectChanges call already on major-9.0.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The actual fix for this PR is fairly small, most of it is just testing. It's also important to note that this is already fixed in v9 in the same exact way, we're just backporting it to v8 here.

Dev build:

8.8.12-dev.11781813448.16e7a064

@ShaneK ShaneK requested a review from a team as a code owner June 18, 2026 20:10
@ShaneK ShaneK requested a review from OS-jacobbell June 18, 2026 20:10
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Jun 18, 2026 8:10pm

Request Review

@github-actions github-actions Bot added the package: angular @ionic/angular package label Jun 18, 2026

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShaneK ShaneK added this pull request to the merge queue Jun 18, 2026
Merged via the queue into main with commit 8e76fd0 Jun 18, 2026
64 checks passed
@ShaneK ShaneK deleted the fix/31220-modal-signal branch June 18, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Angular: Modal does not open when using ModalController and the component declares an InputSignal with the root

2 participants