當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript core.StateService類代碼示例

本文整理匯總了TypeScript中@uirouter/core.StateService的典型用法代碼示例。如果您正苦於以下問題:TypeScript StateService類的具體用法?TypeScript StateService怎麽用?TypeScript StateService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了StateService類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

 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});
   }
 };
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:7,代碼來源:new-page.component.ts

示例2:

 this.cancel = () => {
   if (this.apiId) {
     $state.go("management.apis.detail.portal.documentation", {apiId: this.apiId});
   } else {
     $state.go("management.settings.documentation");
   }
 };
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:7,代碼來源:import-pages.component.ts

示例3:

 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});
   }
 };
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:7,代碼來源:documentation-management.component.ts

示例4:

 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});
   }
 };
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:7,代碼來源:edit-page.component.ts

示例5: it

    it("can cancel a transition that would exit the view's state by returning false", () => {
      $state.defaultErrorHandler(function() {});
      ctrl.prototype.uiCanExit = function() { log += "canexit;"; return false; };
      initial();

      $state.go('bar'); $q.flush(); $timeout.flush();
      expect(log).toBe('canexit;');
      expect($state.current.name).toBe('foo');
    });
開發者ID:apetrosian,項目名稱:ui-router,代碼行數:9,代碼來源:viewHookSpec.ts


注:本文中的@uirouter/core.StateService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。