mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-12 12:08:52 +08:00
Issue number: Internal --------- <!-- 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. --> With Ionic 8 we are dropping Angular 14 and 15 support. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - This PR officially drops Angular 14 and 15 support. Note: The work to do this was done a while ago, but this branch was never merged into `feature-8.0`. The breaking change was already noted in the breaking change guide, so this is not an additional breaking change on top of what was already specified. ## Does this introduce a breaking change? - [x] Yes - [ ] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com> Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com> Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
import { Location } from '@angular/common';
|
|
import {
|
|
ViewChild,
|
|
ViewContainerRef,
|
|
Component,
|
|
Attribute,
|
|
Optional,
|
|
SkipSelf,
|
|
ElementRef,
|
|
NgZone,
|
|
} from '@angular/core';
|
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
import { IonRouterOutlet as IonRouterOutletBase, ProxyCmp } from '@ionic/angular/common';
|
|
import { defineCustomElement } from '@ionic/core/components/ion-router-outlet.js';
|
|
|
|
@ProxyCmp({
|
|
defineCustomElementFn: defineCustomElement,
|
|
})
|
|
@Component({
|
|
selector: 'ion-router-outlet',
|
|
standalone: true,
|
|
template: '<ng-container #outletContent><ng-content></ng-content></ng-container>',
|
|
})
|
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
export class IonRouterOutlet extends IonRouterOutletBase {
|
|
/**
|
|
* `static: true` must be set so the query results are resolved
|
|
* before change detection runs. Otherwise, the view container
|
|
* ref will be ion-router-outlet instead of ng-container, and
|
|
* the first view will be added as a sibling of ion-router-outlet
|
|
* instead of a child.
|
|
*/
|
|
@ViewChild('outletContent', { read: ViewContainerRef, static: true }) outletContent: ViewContainerRef;
|
|
|
|
/**
|
|
* We need to pass in the correct instance of IonRouterOutlet
|
|
* otherwise parentOutlet will be null in a nested outlet context.
|
|
* This results in APIs such as NavController.pop not working
|
|
* in nested outlets because the parent outlet cannot be found.
|
|
*/
|
|
constructor(
|
|
@Attribute('name') name: string,
|
|
@Optional() @Attribute('tabs') tabs: string,
|
|
commonLocation: Location,
|
|
elementRef: ElementRef,
|
|
router: Router,
|
|
zone: NgZone,
|
|
activatedRoute: ActivatedRoute,
|
|
@SkipSelf() @Optional() readonly parentOutlet?: IonRouterOutlet
|
|
) {
|
|
super(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet);
|
|
}
|
|
}
|