Merge branch 'main' into update-from-main

This commit is contained in:
Brandy Smith
2026-03-04 15:16:31 -05:00
299 changed files with 2171 additions and 539 deletions

View File

@@ -1,6 +1,14 @@
import { Location } from '@angular/common';
import { Injectable, Optional } from '@angular/core';
import { NavigationExtras, Router, UrlSerializer, UrlTree, NavigationStart } from '@angular/router';
import {
NavigationExtras,
Router,
UrlSerializer,
UrlTree,
NavigationStart,
NavigationCancel,
NavigationError,
} from '@angular/router';
import type { AnimationBuilder, NavDirection, RouterDirection } from '@ionic/core/components';
import { IonRouterOutlet } from '../directives/navigation/router-outlet';
@@ -42,6 +50,14 @@ export class NavController {
this.guessDirection = this.guessAnimation = id < this.lastNavId ? 'back' : 'forward';
this.lastNavId = this.guessDirection === 'forward' ? ev.id : id;
}
// Reset explicit direction when navigation is canceled (e.g., guard rejection)
// to prevent stale direction from leaking into the next navigation
if (ev instanceof NavigationCancel || ev instanceof NavigationError) {
this.direction = DEFAULT_DIRECTION;
this.animated = DEFAULT_ANIMATED;
this.animationBuilder = undefined;
}
});
}