本文整理汇总了TypeScript中navigation.StateNavigator.fluent方法的典型用法代码示例。如果您正苦于以下问题:TypeScript StateNavigator.fluent方法的具体用法?TypeScript StateNavigator.fluent怎么用?TypeScript StateNavigator.fluent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类navigation.StateNavigator
的用法示例。
在下文中一共展示了StateNavigator.fluent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
stateNavigator.stateContext.clear();
// Navigation Link
var link = stateNavigator.getNavigationLink('people');
link = stateNavigator.getRefreshLink();
link = stateNavigator.getRefreshLink({ page: 2 });
stateNavigator.navigateLink(link);
link = stateNavigator.getNavigationLink('person', { id: 10 });
stateNavigator.navigateLink(link, 'replace');
link = stateNavigator.getNavigationBackLink(1);
var crumb = stateNavigator.stateContext.crumbs[0];
link = crumb.url;
stateNavigator.navigateLink(link, 'none', true);
// Fluent Navigation
var link = stateNavigator.fluent()
.navigate('people')
.refresh()
.refresh({ page: 3 })
.navigate('person', { id: 10 })
.navigateBack(1)
.url;
// State Context
var state: State = stateNavigator.stateContext.state;
var url: string = stateNavigator.stateContext.url;
var title: string = stateNavigator.stateContext.title;
var page: number = stateNavigator.stateContext.data.page;
state = stateNavigator.stateContext.oldState;
page = stateNavigator.stateContext.oldData.page;
state = stateNavigator.stateContext.previousState;