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


TypeScript RouterConfiguration.addPipelineStep方法代码示例

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


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

示例1: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    this.config = config;
    config.title = this.title || 'Catalogue';

    config.addPipelineStep('authorize', AuthenticateStep); // Add a route filter to the authorize extensibility point.

    config.map([
      { route: 'tasks',              name: 'tasks',          moduleId: 'tasks',          nav: true,  title: 'Tasks & Gaps' },
      { route: 'hazards',            name: 'hazards',        moduleId: 'incidents',      nav: true,  title: 'Hazards & Risks'},
      { route: 'ci',                 name: 'ci',             moduleId: 'ci',             nav: true,  title: 'Critical Infrastructures' },
      { route: 'projects',           name: 'projects',       moduleId: 'projects',       nav: true,  title: 'Projects & Products' },
      { route: ['', 'about'],        name: 'about',          moduleId: 'welcome',        nav: true,  title: 'About' },
      { route: 'project/:id',        name: 'project',        moduleId: 'projectDetails', nav: false, title: 'Project details' },
      { route: 'editproject/:id',    name: 'editproject',    moduleId: 'projectEdit',    nav: false, title: 'Edit project', auth: true },
      { route: 'login',              name: 'login',          moduleId: 'login',          nav: false, title: 'Login' },
      { route: 'logout',             name: 'logout',         moduleId: 'logout',         nav: false, title: 'Logout' },
      { route: 'profile',            name: 'profile',        moduleId: 'profile',        nav: false, title: 'Profile'},
      { route: 'users',              name: 'users',          moduleId: 'users',          nav: false, title: 'Users', auth: true },
      { route: 'signup',             name: 'signup',         moduleId: 'signup',         nav: false, title: 'Sign up' }
   // { route: 'users',              name: 'users',          moduleId: 'users',          nav: true,  title: 'Github Users' },
      // { route: 'child-router',       name: 'child-router',   moduleId: 'child-router',   nav: true,  title: 'Child Router' }
    ]);

    this.router = router;
  }
开发者ID:TNOCS,项目名称:catalogue,代码行数:25,代码来源:app.ts

示例2: configureRouter

 configureRouter(config: RouterConfiguration, router: Router) {
     this.router = router;
     config.title = "Capital Area .NET User Group";
     config.addPipelineStep("authorize", ToastNavResult);
     //config.options.pushState = true;
     config.map([
         { route: ["", "events"],
         viewPorts: { mainContent: {moduleId: "./events/events"}, sideBar: {moduleId: "./sideBar/sponsors"}},
         name: "Events", title: "Events", nav: true },
         { route: "jobs",
         viewPorts: { mainContent: {moduleId: "./jobs/jobs"}, sideBar: {moduleId: "./sideBar/sponsors"}},
         name: "jobs", title: "Jobs", nav: true},
         { route: "discussions",
         viewPorts: { mainContent: {moduleId: "./discussions/discussions"}, sideBar: {moduleId: "./sideBar/ads"}},
         name: "Discussions", title: "Discussions", nav:true },
         { route: "eventDetail/:eventId",
         viewPorts: { mainContent: {moduleId: "./events/eventDetail"}, sideBar: {moduleId: "./sideBar/ads"}},
         name: "eventDetail"
         },
         { route: "addJob",
           viewPorts: { mainContent: { moduleId: "./jobs/addJob " }, sideBar: { moduleId: "./sideBar/ads" } },
           name: "addJob"
         }
     ]);
 }
开发者ID:rajajhansi,项目名称:communityapp-aurelia-tswebpack,代码行数:25,代码来源:shell.ts

示例3: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = '<%= _.slugify(appname) %>';
    config.addPipelineStep('authorize', AuthorizeStep);
    config.map([
      { route: ['', 'home'], name: 'home', moduleId: 'pages/home/home', nav: true, title: 'Home' }
    ]);

    this.router = router;
  }
开发者ID:effervescentia,项目名称:generator-aurelia-sails,代码行数:9,代码来源:_app.ts

示例4: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'Aurelia';
    config.map([
      { route: ['', 'welcome'], name: 'welcome',      moduleId: './welcome',      nav: true, title: 'Welcome' },
    ]);

    config.addPipelineStep('authorize', AuthorizeStep);
    this.router = router;
  }
开发者ID:xmichaelx,项目名称:skeleton-navigation,代码行数:9,代码来源:app.ts

示例5: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'Boilerplate';
    config.addPipelineStep('authorize', AuthorizeStep);
    config.map([
      { route: ['', 'about'], name: 'about', moduleId: 'pages/about/about', nav: true, title: 'About' },
      { route: 'examples', name: 'examples', moduleId: 'pages/examples/examples', nav: true, title: 'Examples', auth: true },
      { route: 'login', name: 'login', moduleId: 'pages/login/login', nav: false, title: 'Login' },
      { route: 'logout', name: 'logout', moduleId: 'pages/logout/logout', nav: false, title: 'Logout' }
    ]);

    this.router = router;
  }
开发者ID:effervescentia,项目名称:aurelia-sails-boilerplate-frontend,代码行数:12,代码来源:app.ts

示例6: configureRouter

    configureRouter(config: RouterConfiguration, router: Router) {
        config.title = 'Aurelia';
        config.addPipelineStep("modelbind", NavigationResult);
        config.map([
            { route: ['', 'welcome'], name: 'welcome', moduleId: 'welcome', nav: true, title: 'Welcome' },
            { route: 'users', name: 'users', moduleId: 'users', nav: true, title: 'Github Users' },
            { route: 'child-router', name: 'child-router', moduleId: 'child-router', nav: true, title: 'Child Router' },
            { route: 'login', name: 'login', moduleId: './login/login', nav: true, title: 'Login' },
            { route: 'Mvc', name: 'Mvc', moduleId: './awsm-mvc/awsm-mvc', nav: true, title: 'Mvc' }
        ]);

        this.router = router;
    }
开发者ID:atul221282,项目名称:AureliaTSApp,代码行数:13,代码来源:app.ts

示例7: function

	  let appRouterConfig: any = function(config: RouterConfiguration): void {
	    config.title = 'Aurelia';
			config.addPipelineStep('authorize', AuthorizeStep); // Add a route filter to the authorize extensibility point.

	    config.map([
        { route: ['', 'welcome'], name: 'welcome',      moduleId: PLATFORM.moduleName('./welcome'),                 nav: true,  title: 'Welcome' },
        { route: 'child-router',  name: 'child-router', moduleId: PLATFORM.moduleName('./child-router'),            nav: true,  title: 'Child Router' },
        { route: 'login',         name: 'login',        moduleId: PLATFORM.moduleName('./modules/auth/login'),      nav: false, title: 'Login' },
        { route: 'logout',        name: 'logout',       moduleId: PLATFORM.moduleName('./modules/auth/logout'),     nav: false, title: 'Logout' },
        { route: 'profile',       name: 'profile',      moduleId: PLATFORM.moduleName('./modules/auth/profile'),    nav: false, title: 'Profile' },
        { route: 'signup',        name: 'signup',       moduleId: PLATFORM.moduleName('./modules/auth/signup'),     nav: false, title: 'Signup' },
        { route: 'contacts',      name: 'contacts',     moduleId: PLATFORM.moduleName('./modules/contacts/index'),  nav: true,  title: 'Contacts',  auth: true },
        { route: 'customers',     name: 'customers',    moduleId: PLATFORM.moduleName('./modules/customers/index'), nav: true, 	title: 'CRM', 			auth: true },
        { route: 'todos',         name: 'todos',        moduleId: PLATFORM.moduleName('./modules/todos/index'),     nav: true,  title: 'TODOs',			auth: true }
      ]);
	  };
开发者ID:ghiscoding,项目名称:Realtime-TODO-Aurelia-RethinkDB,代码行数:16,代码来源:app-router-config.ts

示例8: configureRouter

  configureRouter(config: RouterConfiguration, router: Router) {
   config.title = 'Aurelia-Authentication-Loopback-Ts';
   config.addPipelineStep('authorize', AuthenticateStep); // Add a route filter to the authorize extensibility point.

   config.map([
    { route: ['', 'welcome'], name: 'welcome',    moduleId: 'welcome',                  nav: true,  title: 'Welcome' },
    { route: 'users',         name: 'users',      moduleId: 'users',                    nav: true,  title: 'Github Users' },
    { route: 'customers',     name: 'customers',  moduleId: 'customers',                nav: true,  title: 'List Customers' },
    { route: 'customer',      name: 'customer',   moduleId: './modules/customer/index', nav: true,  title: 'Manage Customers', auth: true },

    { route: 'signup',        name: 'signup',     moduleId: './modules/auth/signup',    nav: false, title: 'Signup' },
    { route: 'login',         name: 'login',      moduleId: './modules/auth/login',     nav: false, title: 'Login' },
    { route: 'logout',        name: 'logout',     moduleId: './modules/auth/logout',    nav: false, title: 'Logout',  auth: true },
    { route: 'profile',       name: 'profile',    moduleId: './modules/auth/profile',   nav: false, title: 'Profile', auth: true }
   ]);

    this.router = router;
  }
开发者ID:doktordirk,项目名称:aurelia-authentication-loopback-sample,代码行数:18,代码来源:app.ts

示例9: configureRouter

    configureRouter(config:RouterConfiguration, router:Router) {
        config.addPipelineStep('authorize', AuthorizeStep);
        config.title = 'Langendoen Mechanical Job Management Application';
        config.map([
            {route: ['', 'jobs'], name: 'jobs.list', moduleId: 'resources/views/jobs/list', title: 'Jobs List', nav: true, auth: true, settings: { icon: 'browser', mobileTitle: 'Jobs' }},
            {route: 'jobs/new', name: 'jobs.new', moduleId: 'resources/views/jobs/detail', title: 'New Job', nav: true, auth: true, settings: { icon: 'plus', mobileTitle: 'New' }},
            {route: 'jobs/:id', name: 'jobs.edit', moduleId: 'resources/views/jobs/detail', title: 'Edit Job', auth: true},
            {route: 'customers', name: 'customers.list', moduleId: 'resources/views/customers/list', title: 'Customer List', nav: true, auth: true, settings: { icon: 'building outline', hideMobile: true, showInSettings: true }},
            {route: 'calendar/:date?', href: '#calendar', name: 'calendar', moduleId: 'resources/views/calendar/calendar', title: 'Calendar', nav: true, auth: true, settings: { icon: 'calendar', mobileTitle: 'Cal' } }
        ]);

        if(this.auth.isInRole(Roles.OfficeAdmin)) {
            config.map([
                {route: 'quotes', name: 'quotes.list', moduleId: 'resources/views/quotes/list', title: 'Quotes List', nav: true, auth: true, settings: { icon: 'edit', mobileTitle: 'Quotes' }},
                {route: 'quotes/new', name: 'quotes.new', moduleId: 'resources/views/quotes/detail', title: 'New Quote', auth: true, settings: { icon: 'plus' }},
                {route: 'quotes/:id', name: 'quotes.edit', moduleId: 'resources/views/quotes/detail', title: 'Edit Quote', auth: true},
                {route: 'job-phases/list', name: 'job.phases.list', moduleId: 'resources/views/job-phases/list', title: 'Job Phases', nav: true, auth: true, settings: { icon: 'tasks', hideMobile: true, showInSettings: true }},
                {route: 'job-phases', name: 'job.phases.table', moduleId: 'resources/views/job-phases/table', title: 'Phase List', nav: true, auth: true, settings: { icon: 'table', hideMobile: true }},
            ])
        }

        this.router = router;
    }
开发者ID:Resounding,项目名称:Jobs-Web,代码行数:23,代码来源:app.ts


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