本文整理汇总了TypeScript中@uirouter/core.StateService.go方法的典型用法代码示例。如果您正苦于以下问题:TypeScript StateService.go方法的具体用法?TypeScript StateService.go怎么用?TypeScript StateService.go使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@uirouter/core.StateService
的用法示例。
在下文中一共展示了StateService.go方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.newPage = (type: string) => {
if (this.apiId) {
$state.go('management.apis.detail.portal.newdocumentation', {type: type, parent: this.rootDir});
} else {
$state.go('management.settings.newdocumentation', {type: type, parent: this.rootDir});
}
};
示例2:
this.gotoParent = () => {
if (this.apiId) {
$state.go("management.apis.detail.portal.documentation", {apiId: this.apiId, parent: $state.params.parent});
} else {
$state.go("management.settings.documentation", {parent: $state.params.parent});
}
};
示例3:
this.reset = () => {
if (this.apiId) {
$state.go("management.apis.detail.portal.editdocumentation", {pageId: this.page.id}, {reload: true});
} else {
$state.go("management.settings.editdocumentation", {pageId: this.page.id}, {reload: true});
}
};
示例4:
this.cancel = () => {
if (this.apiId) {
$state.go("management.apis.detail.portal.documentation", {apiId: this.apiId});
} else {
$state.go("management.settings.documentation");
}
};
示例5:
this.UserService.current().then( (user) => {
if (provider.userLogoutEndpoint) {
this.$window.localStorage.setItem("user-logout-url", provider.userLogoutEndpoint);
}
this.$rootScope.$broadcast('graviteeUserRefresh', {'user' : user});
let route = this.RouterService.getLastRoute();
if (route.from && route.from.name !== '' && route.from.name !== 'logout' && route.from.name !== 'confirm') {
this.$state.go(route.from.name, route.fromParams);
} else {
this.$state.go('portal.home');
}
});