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


TypeScript IUrlRouterProvider.when方法代碼示例

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


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

export default function HomeConfig(
	$stateProvider: IStateProvider,
	$urlRouterProvider: IUrlRouterProvider
): void {
	$stateProvider.state(homeState);
	$urlRouterProvider.when('/', '/home');
}
開發者ID:CoolestProjects,項目名稱:app_web,代碼行數:7,代碼來源:home-config.ts

示例3: NavConfig

export default function NavConfig(
	$stateProvider: IStateProvider,
	$urlRouterProvider: IUrlRouterProvider
): void {
	$urlRouterProvider.when('', '/');
	$stateProvider.state(navState);
}
開發者ID:CoolestProjects,項目名稱:app_web,代碼行數:7,代碼來源:nav-config.ts

示例4: 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

示例5: function

	function($stateProvider: IStateProvider,
		$urlRouterProvider: IUrlRouterProvider) {

		$urlRouterProvider.when('/graphs', '/graphs/hierarchy');

		$stateProvider
			.state('graphs', {
				url: '/graphs',
				template: '<graphs></graphs>',
				data: {
					menu: {
						name: 'Graph Examples',
						icon: 'fa-download',
						showSubmenu: true
					}
				}
			}).state('graphs.hierarchy', {
				url: '/hierarchy',
				template: '<hierarchy-example></hierarchy-example>',
				data: {menu: {
					name: 'Hierarchy'
				}
			}
			}).state('graphs.workflow1', {
				url: '/workflow1',
				template: '<workflow-example></workflow-example>',
				data: {
					menu: {
						name: 'Workflow 1'
					}
				}
			}).state('graphs.workflow2', {
				url: '/workflow2',
				template: '<workflow2-example></workflow2-example>',
				data: {
					menu: {
						name: 'Workflow 2'
					}
				}
			}).state('graphs.workflow3', {
				url: '/workflow3',
				template: '<workflow3-example></workflow3-example>',
				data: {
					menu: {
						name: 'Workflow 3'
					}
				}
			});
	}]);
開發者ID:chenhenry,項目名稱:chenhenry,代碼行數:49,代碼來源:graphs.routes.ts

示例6: function

    function($stateProvider: IStateProvider,
             $urlRouterProvider: IUrlRouterProvider) {

        $urlRouterProvider.when('/reporting-studio', '/reporting-studio/reporting-universe');

        $stateProvider
            .state('reporting-studio', {
                url: '/reporting-studio',
                template: '<reporting-studio></reporting-studio>',
                data : {
                    menu: {
                        name: 'Reporting Studio',
                        icon: 'glyphicon-inbox',
                        showSubmenu: true
                    }
                }
            })
            .state('reporting-studio.reporting-universe', {
                url: '/reporting-universe',
                template: '<reporting-universe></reporting-universe>',
                data : {
                    menu: {
                        name: 'Reporting Universe'
                    }
                }
            })
            .state('reporting-studio.tag-sample', {
                url: '/tag-sample',
                template: '<tag-sample></tag-sample>',
                data : {
                    menu: {
                        name: 'Tag Sample'
                    }
                }
            })
            .state('reporting-studio.sample', {
                url: '/sample',
                template: '<sample></sample>',
                data: {
                    menu: {
                        name: 'Reporting Sample'
                    }
                }
            })
    }]);
開發者ID:chenhenry,項目名稱:chenhenry,代碼行數:45,代碼來源:reporting-studio.routes.ts

示例7: function

    function($stateProvider: IStateProvider,
        $urlRouterProvider: IUrlRouterProvider) {

        $urlRouterProvider.when('/dg', '/dg/client');
        $urlRouterProvider.when('/dg/good', '/dg/good/list');
        $urlRouterProvider.when('/dg/order', '/dg/order/list');

        $stateProvider
            .state('dg', {
                url: '/dg',
                template: '<dg></dg>',
                data : {
                    menu: {
                        name: 'Data Labs',
                        icon: 'glyphicon-inbox',
                        showSubmenu: true
                    }
                }
            }).state('dg.client', {
                url: '/client',
                template: '<client></client>',
                data : {
                    menu: {
                        name: 'Client Manage'
                    }
                }
            }).state('dg.good', {
                url: '/good',
                template: '<good></good>',
                data: {
                    menu: {
                        name: 'Good Manage',
                        icon: 'fa-folder-open'
                    }
                }
            }).state('dg.good.list', {
                url: '/list',
                template: '<good-list></good-list>',
                data: {
                    menu: {
                        name: 'Tab 1'
                    }
                }
            }).state('dg.good.detail', {
                url: '/detail/:id',
                template: '<good-detail></good-detail>',
                data: {
                    menu: {
                        name: 'Tab 2'
                    }
                }
            }).state('dg.order', {
                url: '/order',
                template: '<order></order>',
                data: {
                    menu: {
                        name: 'Order Manage'
                    }
                }
             }).state('dg.order.list', {
                url: '/list',
                template: '<order-list></order-list>',
                data: {
                    menu: {
                        name: 'Order List'
                    }
                }
            }).state('dg.order.detail', {
                url: '/detail/:id',
                template: '<order-detail></order-detail>',
                data: {
                    menu: {
                        name: 'Tab 2'
                    }
                }
            }).state('dg.brand', {
                url: '/brand',
                template: '<brand></brand>',
                data: {
                    menu: {
                        name: 'Brand Manage'
                    }
                }
            }).state('dg.category', {
                url: '/category',
                template: '<category></category>',
                data: {
                    menu: {
                        name: 'Category Manage'
                    }
                }
            });
            
    }]);
開發者ID:chenhenry,項目名稱:chenhenry,代碼行數:94,代碼來源:dg.routes.ts


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