当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript StateProvider.state方法代码示例

本文整理汇总了TypeScript中@uirouter/angularjs.StateProvider.state方法的典型用法代码示例。如果您正苦于以下问题:TypeScript StateProvider.state方法的具体用法?TypeScript StateProvider.state怎么用?TypeScript StateProvider.state使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@uirouter/angularjs.StateProvider的用法示例。


在下文中一共展示了StateProvider.state方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

  .config(($stateProvider: StateProvider) => {
    'ngInject';

    $stateProvider.state({
      name: 'destiny2.vendors',
      component: 'd2Vendors',
      url: '/vendors?characterId'
    });

    $stateProvider.state({
      name: 'destiny2.vendor',
      component: 'd2SingleVendor',
      url: '/vendors/:id?characterId'
    });
  })
开发者ID:delphiactual,项目名称:DIM,代码行数:15,代码来源:vendors.module.ts

示例2:

  .config(($stateProvider: StateProvider) => {
    'ngInject';

    $stateProvider.state({
      name: 'destiny2.progress',
      component: 'd2Progress',
      url: '/progress'
    });
  })
开发者ID:delphiactual,项目名称:DIM,代码行数:9,代码来源:progress.module.ts

示例3: configFn

    configFn($stateProvider:StateProvider) {
       $stateProvider.state('jcr-query',{
            url:'/admin/jcr-query',
            views: {
                'content': {
                    //templateUrl: 'js/admin/jcr/jcr-query.html',
                    component:"jcrQueryController",
                    //controllerAs:"vm"
                }
            },
            resolve: {
                loadMyCtrl: this.lazyLoadController(['admin/jcr/JcrQueryController'])
            },
            data:{
                breadcrumbRoot:false,
                displayName:'JCR Admin',
                module:moduleName,
                permissions:AccessConstants.UI_STATES.JCR_ADMIN.permissions
            }
        });

        $stateProvider.state('cluster',{
            url:'/admin/cluster',
            views: {
                'content': {
                   // templateUrl: 'js/admin/cluster/cluster-test.html',
                    component:"clusterController",
                    //controllerAs:"vm"
                }
            },
            resolve: {
                loadMyCtrl: this.lazyLoadController(['admin/cluster/ClusterController'])
            },
            data:{
                breadcrumbRoot:false,
                displayName:'Kylo Cluster',
                module:moduleName,
                permissions:[]
            }
        })
    }  
开发者ID:prashanthc97,项目名称:kylo,代码行数:41,代码来源:module.ts

示例4:

  .config(($stateProvider: StateProvider) => {
    'ngInject';

    $stateProvider.state({
      name: 'login',
      url: '/login',
      component: 'login',
      params: {
        reauth: false
      }
    });
  })
开发者ID:delphiactual,项目名称:DIM,代码行数:12,代码来源:login.module.ts

示例5: destinyAccountRoute

export function destinyAccountRoute($stateProvider: StateProvider) {
  'ngInject';

  $stateProvider.state({
    name: 'destiny-account',
    redirectTo: 'destiny2.inventory',
    url: '/:membershipId-{platformType:int}'
  });

  // Register a lazy future state for all Destiny 1 pages, so they are not in the main chunk.
  $stateProvider.state({
    name: 'destiny1.**',
    parent: 'destiny-account',
    lazyLoad($transition$) {
      const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad');
      // tslint:disable-next-line:space-in-parens
      return import(/* webpackChunkName: "destiny1" */ '../destiny1/destiny1.module.js')
        .then((mod) => $ocLazyLoad.load(mod.default));
    }
  });
}
开发者ID:delphiactual,项目名称:DIM,代码行数:21,代码来源:destiny-account.route.ts

示例6: routes

function routes(
  $stateProvider: StateProvider,
  $urlRouterProvider: UrlRouterProvider,
  $locationProvider: LocationConfig
) {
  $locationProvider.hashPrefix('');
  $stateProvider.state('about', {
    url: '/about',
    component: 'ltAbout'
  });

  const params = [
    'files',
    'user',
    'userLimit',
    'userStart',
    'userEnd',
    'category',
    'categoryDepth'
  ].join('&');

  $stateProvider.state('select', {
    url: '/?' + params,
    component: 'ltFilesSelector'
  });

  $stateProvider.state('geolocate', {
    url: '/geolocate?' + params,
    component: 'ltMain'
  });

  $stateProvider.state('map', {
    url: '/map?' + params,
    component: 'ltAllMap'
  });

  $urlRouterProvider.otherwise('/');
}
开发者ID:simon04,项目名称:locator-tool,代码行数:38,代码来源:index.ts

示例7: configFn

 configFn($stateProvider:StateProvider, $compileProvider: angular.ICompileProvider) {
      $stateProvider.state(AccessConstants.UI_STATES.ALERTS.state,{
         url:'/alerts',
         views: {
             'content': {
                // templateUrl: 'js/ops-mgr/alerts/alerts-table.html',
                 component:'alertsController',
                 //controllerAs:'vm'
             }
         },
         params: {
             query: null
         },
         resolve: {
             loadPage: this.lazyLoad()
         },
         data:{
             displayName:'Alerts',
             module:moduleName,
             permissions:AccessConstants.UI_STATES.ALERTS.permissions
         }
     }).state(AccessConstants.UI_STATES.ALERT_DETAILS.state,{
         url:"/alert-details/{alertId}",
         views: {
             'content': {
                 //templateUrl: 'js/ops-mgr/alerts/alert-details.html',
                 component:'alertDetailsController',
                 //controllerAs:'vm'
             }
         },
         params: {
             alertId: null
         },
         resolve: {
             loadMyCtrl: this.lazyLoadController(['ops-mgr/alerts/AlertDetailsController'])
         },
         data:{
             displayName:'Alert Details',
             module:moduleName,
             permissions:AccessConstants.UI_STATES.ALERT_DETAILS.permissions
         }
     });
 }  
开发者ID:prashanthc97,项目名称:kylo,代码行数:43,代码来源:module.ts

示例8: defaultAccountRoute

export function defaultAccountRoute($stateProvider: StateProvider) {
  'ngInject';

  // A dummy state that'll redirect to the selected character's Destiny 1 inventory
  $stateProvider.state({
    name: 'default-account',
    resolve: {
      activeAccount: () => {
        'ngInject';
        return getPlatforms().then(getActivePlatform);
      }
    },
    controller: function controller($state, activeAccount) {
      'ngInject';

      if (activeAccount) {
        $state.go(`destiny${activeAccount.destinyVersion}.inventory`, activeAccount);
      } else {
        // A bit awkward, but getPlatforms should already have redirected to login
      }
    }
  });
}
开发者ID:delphiactual,项目名称:DIM,代码行数:23,代码来源:default-account.route.ts


注:本文中的@uirouter/angularjs.StateProvider.state方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。