Updated typings and tests for Navigation 4.0.1

This commit is contained in:
Graham Mendick 2017-08-31 15:54:51 +01:00
parent a7d0be726e
commit 76e8326e9f
2 changed files with 11 additions and 1 deletions

View File

@ -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
*/

View File

@ -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