本文整理汇总了TypeScript中angular-ui-router.IUrlRouterProvider类的典型用法代码示例。如果您正苦于以下问题:TypeScript IUrlRouterProvider类的具体用法?TypeScript IUrlRouterProvider怎么用?TypeScript IUrlRouterProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IUrlRouterProvider类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: function
function($stateProvider: IStateProvider,
$urlRouterProvider: IUrlRouterProvider) {
$urlRouterProvider.when('/storage', '/storage/dataasset');
$urlRouterProvider.when('/storage/catalog', '/storage/catalog');
$stateProvider
.state('storage', {
url: '/storage',
template: '<storage></storage>',
data : {
menu: {
name: 'Source Data',
icon: 'glyphicon-inbox',
showSubmenu: true
}
}
})
.state('storage.createdataasset', {
url: '/createdataasset',
template: '<create-data-asset></create-data-asset>',
data : {
menu: {
name: 'Create RFo Data Assets'
}
}
})
.state('storage.catalog', {
url: '/catalog',
template: '<catalog></catalog>',
data: {
menu: {
name: 'Data Catalog',
icon: 'glyphicon-inbox',
showSubmenu: true
}
}
}).state('storage.catalog.structure', {
url: '/structure/:sourceName/:structureName',
template: '<structure></structure>',
data: {
menu: {
name: 'File Browser'
}
}
}).state('storage.catalog.unstructuredfiles', {
url: '/unstructuredfiles/:sourceName',
template: '<unstructuredfiles></unstructuredfiles>',
data: {
menu: {name: 'Unstructured Files'}
}
}).state('storage.catalog.createstructure', {
url: '/createstructure',
template: '<createstructure></createstructure>',
data: {
menu: {name: 'Create Structure'}
}
});
}]);
开发者ID:chenhenry,项目名称:chenhenry,代码行数:60,代码来源:storage.routes.ts
示例2: NavConfig
export default function NavConfig(
$stateProvider: IStateProvider,
$urlRouterProvider: IUrlRouterProvider
): void {
$urlRouterProvider.when('', '/');
$stateProvider.state(navState);
}
开发者ID:CoolestProjects,项目名称:app_web,代码行数:7,代码来源:nav-config.ts
示例3: function
function($stateProvider: IStateProvider,
$urlRouterProvider: IUrlRouterProvider) {
$urlRouterProvider.when('/page4', '/page4/tab1');
$stateProvider
.state('page4', {
url: '/page4',
template: '<page4></page4>',
data: {
menu: {
name: 'Module Example',
icon: 'fa-folder-open',
showSubmenu: true
}
}
}).state('page4.tab1', {
url: '/tab1',
template: '<page4-tab1></page4-tab1>',
data: {
menu: {
name: 'Tab 1'
}
}
}).state('page4.tab2', {
url: '/tab2',
template: '<page4-tab2></page4-tab2>',
data: {
menu: {
name: 'Tab 2'
}
}
});
}]);
开发者ID:chenhenry,项目名称:chenhenry,代码行数:34,代码来源:page4.routes.ts
示例4: HomeConfig
export default function HomeConfig(
$stateProvider: IStateProvider,
$urlRouterProvider: IUrlRouterProvider
): void {
$stateProvider.state(homeState);
$urlRouterProvider.when('/', '/home');
}
开发者ID:CoolestProjects,项目名称:app_web,代码行数:7,代码来源:home-config.ts
示例5: function
.config(["$urlRouterProvider", "$stateProvider", function (route: IUrlRouterProvider, stateProvider: IStateProvider) {
route.otherwise("/state1/");
stateProvider
.state("state1", {
url: "/state1/:detail",
templateUrl: "app/view1/view1.html",
controller: "View1Controller as vm"
})
.state("state2", {
url: "/state2",
templateUrl: "app/view2/view2.html",
controller: View2Controller,
})
.state("state3", {
url: "/state3/:detail/:viewId",
templateUrl: "app/view1/view1.html",
controller: "View1Controller as vm"// same view as View1
})
.state("state4", {
url: "/state4",
template: "<some-component></some-component>",
});
}]);
开发者ID:AmirSasson,项目名称:Angular1TypescriptSystemJs,代码行数:25,代码来源:boot.ts
示例6: function
function($stateProvider: IStateProvider,
$urlRouterProvider: IUrlRouterProvider) {
// App Routing
$urlRouterProvider.otherwise('/dashboard');
if(CONSTANTS.atlas.ui.frontendOnly){
$stateProvider
.state('dashboard', {
url: '/dashboard',
template: '<dashboard></dashboard>',
data: {
menu: {
name: 'Dashboard',
icon: 'fa-dashboard'
}
}
})
// .state('page3', {
// url: '/page3',
// template: '<page3></page3>',
// data: {
// menu: {
// name: 'Localization',
// icon: 'fa-calculator'
// }
// }
// });
}}]);
开发者ID:chenhenry,项目名称:chenhenry,代码行数:28,代码来源:app.routes.ts
示例7: routes
export function routes($stateProvider: IStateProvider, $urlRouterProvider: IUrlRouterProvider) {
$stateProvider
.state('app', {
url: '/app',
abstract: true,
template: require('./App/app.html')
});
$urlRouterProvider.otherwise('/app/language');
}
开发者ID:egilsster,项目名称:ionic-webpack-typescript,代码行数:10,代码来源:index.config.ts
示例8: CoreConfiguration
/* @ngInject */
function CoreConfiguration($locationProvider : ILocationProvider, $urlRouterProvider : IUrlRouterProvider) {
$locationProvider.html5Mode(true);
var init = true;
$urlRouterProvider.rule(function ($injector, $location) {
if (init && $location.path() !== '/') {
$location.replace().url('/?redir=' + $location.path());
}
init = false;
});
}
开发者ID:kodypeterson,项目名称:screeps,代码行数:11,代码来源:core.module.ts
示例9: routeConfig
function routeConfig($stateProvider: IStateProvider,
$urlRouterProvider: IUrlRouterProvider) {
$stateProvider
.state('login', {
url: '/login',
controller: 'LoginController as ctrl',
templateUrl: 'login/login.html'
})
$urlRouterProvider.otherwise('/login');
}
开发者ID:martinmcwhorter,项目名称:ng-ts-presentation,代码行数:12,代码来源:routeConfig.ts
示例10: constructor
constructor($stateProvider: IStateProvider, $urlRouterProvider: IUrlRouterProvider){
$urlRouterProvider.otherwise("/products");
$stateProvider
.state("products", {
url: "/products",
template: "<app-product-list></app-product-list>"
})
.state("productDetails", {
url: "/product/:id",
template: "<app-product></app-product>"
});
}
开发者ID:ryanlangton,项目名称:angular-upgrade,代码行数:13,代码来源:app.routes.ts
注:本文中的angular-ui-router.IUrlRouterProvider类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论