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


TypeScript RouterConfiguration.mapUnknownRoutes方法代码示例

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


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

示例1: configureRouter

    public configureRouter(config: RouterConfiguration, router: Router) : void {
        config.title = "Aurelia";
        config.map([
            {
                route: ["", "current-games"],
                name: "current-games",
                moduleId: "current-games",
                nav: true,
                title: "Current games",
            },
            { 
                route: "summoners", 
                name: "summoners",      
                moduleId: "summoner-overview",      
                nav: true, 
                title: "Summoners",
            },
            { 
                route: "logout", 
                name: "logout",      
                moduleId: "logout",      
                nav: false, 
                title: "Logout",
            },
        ]);
        config.mapUnknownRoutes(instruction => "summoner-overview");

        this.router = router;
    }
开发者ID:LeagueLogbook,项目名称:LogbookWebsite,代码行数:29,代码来源:app-logged-in.ts

示例2: configure

	configure(config: RouterConfiguration) {
		config.options.pushState = true;
		config.map([
			{
				route: ["", "home"],
				title: "Home",
				name: consts.routeStates.home,
				moduleId: `${consts.basePath}/areas/home/home`,
				nav: false,
				settings: {}
			}, {
				route: "heroes",
				title: "Heroes",
				name: consts.routeStates.heroesLayout,
				moduleId: `${consts.basePath}/areas/hero/hero-layout`,
				nav: true,
				settings: {}
			}, {
				route: "basic-form",
				title: "Basic Form",
				name: consts.routeStates.basicForm,
				moduleId: `${consts.basePath}/areas/basic-form/basic-form`,
				nav: true,
				settings: {}
			}, {
				route: "route-builder",
				title: "Route builder lab",
				name: consts.routeStates.routeBuilder,
				moduleId: `${consts.basePath}/areas/route-builder/route-builder.component`,
				nav: true,
				settings: {}
			}
		]);
		config.mapUnknownRoutes(`${consts.basePath}/areas/error/not-found`);
	}
开发者ID:sketch7,项目名称:ssv-au-dojo,代码行数:35,代码来源:app.router.ts

示例3: configureRouter

 configureRouter(config: RouterConfiguration): void {
     logger.debug("configuring the router");
     config.title = "SKG - Adventure";
     config.map([
         { route: '', redirect: 'level-select' },
         { route: 'level-select', name: 'level-select', moduleId: 'level-select/level-select' }
     ]);
     config.mapUnknownRoutes('level-select/level-select');
 }
开发者ID:TylerLeite,项目名称:supa-kyapucha-gemu,代码行数:9,代码来源:adventure.ts

示例4: configureRouter

 configureRouter(config: RouterConfiguration): void {
     logger.debug("configuring the router");
     config.title = "SKG";
     config.map([
         { route: ['', 'home'], name: 'home', moduleId: 'home/home' },
         { route: 'online', name: 'online', moduleId: 'online/online' },
         { route: 'local', name: 'local', moduleId: 'local/local' },
         { route: 'adventure', name: 'adventure', moduleId: 'adventure/adventure' },
         { route: 'skynet', name: 'skynet', moduleId: 'aigame/aigame' }
     ]);
     config.mapUnknownRoutes('home/home');
 }
开发者ID:TylerLeite,项目名称:supa-kyapucha-gemu,代码行数:12,代码来源:app.ts

示例5: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'Aurelia';
    config.options.pushState = true;
    config.options.root = '/';

    config.map([
      { route: ['', 'welcome'], name: 'welcome',      moduleId: PLATFORM.moduleName('./welcome'),      nav: true, title: 'Welcome' },
      { route: 'users',         name: 'users',        moduleId: PLATFORM.moduleName('./users'),        nav: true, title: 'Github Users' },
      { route: 'child-router',  name: 'child-router', moduleId: PLATFORM.moduleName('./child-router'), nav: true, title: 'Child Router' }
    ]);

    config.mapUnknownRoutes(PLATFORM.moduleName('not-found'));

    this.router = router;
  }
开发者ID:AshleyGrant,项目名称:skeleton-navigation,代码行数:15,代码来源:app.ts

示例6: configureRouter

 public configureRouter(config: RouterConfiguration, router: Router) {
     config.title = "Aurelia";
     config.map([
         {
             route: ["", "welcome"],
             name: "welcome",
             moduleId: "welcome",
             nav: true,
             title: "Welcome",
         },
         {
             route: "login",
             name: "login",
             moduleId: "login",
             nav: false,
             title: "Login",
         },
     ]);
     config.mapUnknownRoutes(instruction => "welcome");
     
     this.router = router;
 }    
开发者ID:LeagueLogbook,项目名称:LogbookWebsite,代码行数:22,代码来源:app-logged-out.ts

示例7: configureRouter

 configureRouter(config: RouterConfiguration, router: Router) {
   this.router = router;
   config.title = UIConstants.App.Title;
   config.mapUnknownRoutes('./home/404');
   config.map([
     {
       route: ['', 'home'],
       moduleId: './home/view',
       title: 'Home',
       nav: false,
       auth: false,
       name: 'home'
     }, {
       route: 'start',
       moduleId: './home/start',
       title: 'Getting Started',
       nav: true,
       auth: false,
       settings: { section: 'Framework', disabled: true },
       name: 'start'
     }, {
       route: 'example',
       moduleId: './home/example',
       title: 'App Example',
       nav: true,
       auth: false,
       settings: { section: 'Framework', disabled: true },
       name: 'example'
     }, {
       route: 'styles',
       moduleId: './styles/view',
       title: 'Styling',
       nav: true,
       auth: false,
       settings: { section: 'Framework' },
       name: 'styles'
     }, {
       route: 'viewport',
       moduleId: './core/viewport',
       title: 'Viewport',
       nav: true,
       auth: false,
       settings: { section: 'Core Elements', disabled: true },
       name: 'viewport'
     }, {
       route: 'pages',
       moduleId: './core/pages',
       title: 'Pages',
       nav: true,
       auth: false,
       settings: { section: 'Core Elements' },
       name: 'pages'
     }, {
       route: 'grid',
       moduleId: './core/grid',
       title: 'Responsive Grid',
       nav: true,
       auth: false,
       settings: { section: 'Core Elements' },
       name: 'grid'
     }, {
       route: 'input',
       moduleId: './inputs/view',
       title: 'Inputs',
       nav: true,
       auth: false,
       settings: { section: 'Input Elements' },
       name: 'input'
     }, {
       route: 'option',
       moduleId: './inputs/option',
       title: 'Option Inputs',
       nav: true,
       auth: false,
       settings: { section: 'Input Elements' },
       name: 'option'
     }, {
       route: 'list',
       moduleId: './inputs/list',
       title: 'Lists',
       nav: true,
       auth: false,
       settings: { section: 'Input Elements' },
       name: 'list'
     }, {
       route: 'markdown',
       moduleId: './inputs/markdown',
       title: 'Markdown Editor',
       nav: true,
       auth: false,
       settings: { section: 'Input Elements' },
       name: 'markdown'
     }, {
       route: 'button',
       moduleId: './inputs/button',
       title: 'Buttons',
       nav: true,
       auth: false,
       settings: { section: 'Input Elements' },
       name: 'button'
//.........这里部分代码省略.........
开发者ID:sigmaframeworks,项目名称:sigma-ui-framework,代码行数:101,代码来源:app.ts


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