diff --git a/types/navigation/index.d.ts b/types/navigation/index.d.ts index 6f05956a8a..fdc729f11c 100644 --- a/types/navigation/index.d.ts +++ b/types/navigation/index.d.ts @@ -347,6 +347,10 @@ export class StateContext { * Gets the NavigationData for the last displayed State */ oldData: any; + /** + * Gets the Url for the last displayed State + */ + oldUrl: string; /** * Gets the State of the last Crumb in the crumb trail */ @@ -355,6 +359,10 @@ export class StateContext { * Gets the NavigationData of the last Crumb in the crumb trail */ previousData: any; + /** + * Gets the Url of the last Crumb in the crumb trail + */ + previousUrl: string; /** * Gets the current State */ diff --git a/types/navigation/navigation-tests.ts b/types/navigation/navigation-tests.ts index f710670953..37e597f841 100644 --- a/types/navigation/navigation-tests.ts +++ b/types/navigation/navigation-tests.ts @@ -83,12 +83,14 @@ link = stateNavigator.fluent() // State Context let state: State = stateNavigator.stateContext.state; -const url: string = stateNavigator.stateContext.url; +let url: string = stateNavigator.stateContext.url; const title: string = stateNavigator.stateContext.title; let page: number = stateNavigator.stateContext.data.page; state = stateNavigator.stateContext.oldState; +url = stateNavigator.stateContext.oldUrl; page = stateNavigator.stateContext.oldData.page; state = stateNavigator.stateContext.previousState; +url = stateNavigator.stateContext.previousUrl; page = stateNavigator.stateContext.previousData.page; // Navigation Data