mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
fix(angular): overlays are defined when using standalone controllers (#28560)
Issue number: resolves #28385 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Overlay controllers do not register their respective overlays components. This results in the overlay not appearing. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Each standalone overlay controller manually calls `defineCustomElement` for their respective overlay component to ensure the component is loaded/registered. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.5.6-dev.11700492285.1581ed02`
This commit is contained in:
@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
||||
import { OverlayBaseController } from '@ionic/angular/common';
|
||||
import type { ActionSheetOptions } from '@ionic/core/components';
|
||||
import { actionSheetController } from '@ionic/core/components';
|
||||
import { defineCustomElement } from '@ionic/core/components/ion-action-sheet.js';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -9,5 +10,6 @@ import { actionSheetController } from '@ionic/core/components';
|
||||
export class ActionSheetController extends OverlayBaseController<ActionSheetOptions, HTMLIonActionSheetElement> {
|
||||
constructor() {
|
||||
super(actionSheetController);
|
||||
defineCustomElement();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user