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


TypeScript StateService.transitionTo方法代碼示例

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


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

示例1:

 this.selectTab = (idx: number) => {
   this.selectedTab = idx;
   this.currentTab = this.tabs[this.selectedTab];
   if (this.apiId) {
     $state.transitionTo("management.apis.detail.portal.editdocumentation", {apiId: this.apiId, pageId: this.page.id, tab: this.currentTab}, {notify: false});
   } else {
     $state.transitionTo("management.settings.editdocumentation", {pageId: this.page.id, tab: this.currentTab}, {notify: false});
   }
 };
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:9,代碼來源:edit-page.component.ts

示例2: updateTimeframe

 updateTimeframe(timeframeId) {
   if (timeframeId) {
     this.$state.transitionTo(
       this.$state.current,
       _.merge(this.$state.params, {
         timestamp: '',
         timeframe: timeframeId
       }),
       {notify: false});
     this.setTimeframe(timeframeId, true);
   }
 }
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:12,代碼來源:dashboard-timeframe.controller.ts

示例3: createAndSendQuery

  createAndSendQuery(silent) {
    // Create a query with all the current filters
    let query = _.values(_.mapValues(this.fields, function(value) { return value.query; })).join(' AND ');

    // Update the query parameter
    if (!silent) {
      this.$state.transitionTo(
        this.$state.current,
        _.merge(this.$state.params, {
          q: query
        }),
        {notify: false});
      this.onFilterChange({query: query, widget: this.lastSource});
    }
  }
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:15,代碼來源:dashboard-filter.controller.ts

示例4: changeFilter

  changeFilter(statusFilter) {
    this.selectedStatus = statusFilter;
    this.dndEnabled = (statusFilter === 'published') && this.UserService.isUserHasPermissions(['api-plan-u']);

    if (_.includes(this.selectedStatus, statusFilter)) {
      _.pull(this.selectedStatus, statusFilter);
    } else {
      this.selectedStatus.push(statusFilter);
    }
    this.$state.transitionTo(
      this.$state.current,
      _.merge(this.$state.params, {
        state: statusFilter
      }));
    this.applyFilters();
  }
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:16,代碼來源:list-plans.controller.ts

示例5: update

  update(timeframeParam) {
    let that = this;

    let timeframe = {
      interval: parseInt(timeframeParam.interval),
      from: parseInt(timeframeParam.from),
      to: parseInt(timeframeParam.to)
    };

    // Select the best timeframe
    let diff = timeframe.to - timeframe.from;

    let tf = _.findLast(that.timeframes, function (tframe: Timeframe) {
      return tframe.range <= diff;
    });

    this.timeframe = tf ? tf : that.timeframes[0];

    // timeframeChange event is dynamically initialized, so we have to define a timeout to correctly fired it
    this.$timeout(function () {
      let event = {
        interval: that.timeframe.interval,
        from: timeframe.from,
        to: timeframe.to
      };

      that.onTimeframeChange({timeframe: event});
    }, 200);

    this.current = {
      interval: this.timeframe.interval,
      intervalLabel: moment.duration(this.timeframe.interval).humanize(),
      from: timeframe.from,
      to: timeframe.to
    };

    this.$state.transitionTo(
      this.$state.current, _.merge(this.$state.params, this.current));

    this.pickerStartDate = moment(timeframe.from);
    this.pickerEndDate = moment(timeframe.to);
  }
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:42,代碼來源:dashboard-timeframe.controller.ts

示例6: viewLogs

 viewLogs() {
   // Update the query parameter
   this.$state.transitionTo(
     'management.apis.detail.analytics.logs',
     this.$state.params);
 }
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:6,代碼來源:analytics.controller.ts

示例7:

 $timeout(function () {
   $state.params.notificationId = vm.selectedNotificationSetting.id;
   $state.transitionTo($state.current, $state.params);
 });
開發者ID:gravitee-io,項目名稱:gravitee-management-webui,代碼行數:4,代碼來源:notificationsettings.component.ts


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