@ionic/angular 7.5.6-dev.11700086473.1eebae2a → 7.5.6-dev.11700149859.12fc59a6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1459,7 +1459,8 @@ const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
1459
1459
  // TODO(FW-2827): types
1460
1460
  // eslint-disable-next-line @angular-eslint/directive-class-suffix
1461
1461
  class IonRouterOutlet {
1462
- constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
1462
+ constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, outletContent, parentOutlet) {
1463
+ this.outletContent = outletContent;
1463
1464
  this.parentOutlet = parentOutlet;
1464
1465
  this.activatedView = null;
1465
1466
  // Maintain map of activated route proxies for each component instance
@@ -1646,8 +1647,15 @@ class IonRouterOutlet {
1646
1647
  const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
1647
1648
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1648
1649
  const component = snapshot.routeConfig.component ?? snapshot.component;
1649
- cmpRef = this.activated = this.location.createComponent(component, {
1650
- index: this.location.length,
1650
+ /**
1651
+ * View components need to be added as a child of ion-router-outlet.
1652
+ * However, createComponent mounts components as siblings of the
1653
+ * ViewContainerRef. As a result, outletContent must reference
1654
+ * an ng-container inside of ion-router-outlet and not
1655
+ * ion-router-outlet itself.
1656
+ */
1657
+ cmpRef = this.activated = this.outletContent.createComponent(component, {
1658
+ index: this.outletContent.length,
1651
1659
  injector,
1652
1660
  environmentInjector: environmentInjector ?? this.environmentInjector,
1653
1661
  });
@@ -1766,7 +1774,7 @@ class IonRouterOutlet {
1766
1774
  this.currentActivatedRoute$.next({ component, activatedRoute });
1767
1775
  }
1768
1776
  }
1769
- /** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: [{ token: 'name', attribute: true }, { token: 'tabs', attribute: true, optional: true }, { token: i1.Location }, { token: i0.ElementRef }, { token: i3.Router }, { token: i0.NgZone }, { token: i3.ActivatedRoute }, { token: IonRouterOutlet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
1777
+ /** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: [{ token: 'name', attribute: true }, { token: 'tabs', attribute: true, optional: true }, { token: i1.Location }, { token: i0.ElementRef }, { token: i3.Router }, { token: i0.NgZone }, { token: i3.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: IonRouterOutlet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
1770
1778
  /** @nocollapse */ IonRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: IonRouterOutlet, selector: "ion-router-outlet", inputs: { animated: "animated", animation: "animation", mode: "mode", swipeGesture: "swipeGesture", name: "name" }, outputs: { stackWillChange: "stackWillChange", stackDidChange: "stackDidChange", activateEvents: "activate", deactivateEvents: "deactivate" }, exportAs: ["outlet"], ngImport: i0 });
1771
1779
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, decorators: [{
1772
1780
  type: Directive,
@@ -1784,7 +1792,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1784
1792
  }, {
1785
1793
  type: Attribute,
1786
1794
  args: ['tabs']
1787
- }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: IonRouterOutlet, decorators: [{
1795
+ }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: IonRouterOutlet, decorators: [{
1788
1796
  type: SkipSelf
1789
1797
  }, {
1790
1798
  type: Optional