mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
When a sidebar item links to a page in a different category (e.g., Route
transition animations under Animations links to a Routing page), clicking
back navigates to the main menu instead of the originating category.
Store the originating category in NavigationState when clicking a
cross-referenced item, so the back button returns to the correct section.
(cherry picked from commit 8132a96884)
22 lines
564 B
TypeScript
22 lines
564 B
TypeScript
/*!
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
export interface NavigationItem {
|
|
label?: string;
|
|
path?: string;
|
|
children?: NavigationItem[];
|
|
isExternal?: boolean;
|
|
isExpanded?: boolean;
|
|
level?: number;
|
|
parent?: NavigationItem;
|
|
contentPath?: string;
|
|
status?: 'new' | 'updated';
|
|
category?: string;
|
|
isCrossReferenced?: boolean;
|
|
preserveOtherCategoryOrder?: boolean; // true by default
|
|
}
|