当前位置: 首页>>代码示例>>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;未经允许,请勿转载。