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


TypeScript angularjs.StateProvider類代碼示例

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


在下文中一共展示了StateProvider類的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類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。