本文整理汇总了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;
}
示例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"
}
]);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 }
]);
};
示例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;
}
示例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;
}