zgo/src/app/app-routing.module.ts

29 lines
1.4 KiB
TypeScript
Raw Normal View History

2021-10-01 20:10:14 +00:00
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
2021-10-15 19:14:49 +00:00
import { ViewerComponent } from './viewer/viewer.component';
2022-03-25 23:57:02 +00:00
import { ReceiptComponent } from './receipt/receipt.component';
2021-10-15 19:14:49 +00:00
import { LoginComponent } from './login/login.component';
2022-01-18 22:40:36 +00:00
import { BusinessComponent } from './business/business.component';
2022-05-23 19:14:21 +00:00
import { InvoiceComponent } from './invoice/invoice.component';
import { ListOrdersComponent } from './listorders/listorders.component';
2021-10-15 19:14:49 +00:00
import { AuthGuardService } from './auth-guard.service';
import { NodeResolverService } from './node-resolver.service';
2021-10-01 20:10:14 +00:00
2021-10-15 19:14:49 +00:00
const routes: Routes = [
{ path: '', component: LoginComponent, resolve: { response: NodeResolverService} },
2021-10-20 20:51:14 +00:00
//{ path: 'create', component: PostCreateComponent, canActivate: [AuthGuardService]},
2021-11-05 14:53:29 +00:00
{ path: 'shop', component: ViewerComponent, canActivate: [AuthGuardService]},
{ path: 'orders', component: ListOrdersComponent, canActivate: [AuthGuardService]},
2022-02-01 18:04:16 +00:00
{ path: 'biz', component: BusinessComponent, canActivate: [AuthGuardService]},
2022-03-25 23:57:02 +00:00
{ path: 'receipt/:orderId', component: ReceiptComponent},
2022-05-23 19:14:21 +00:00
{ path: 'invoice/:orderId', component: InvoiceComponent},
2021-11-11 15:18:38 +00:00
{ path: 'login', component: LoginComponent, resolve: { response: NodeResolverService}}
2021-10-15 19:14:49 +00:00
];
2021-10-01 20:10:14 +00:00
@NgModule({
imports: [RouterModule.forRoot(routes)],
2021-10-15 19:14:49 +00:00
exports: [RouterModule],
providers: [AuthGuardService]
2021-10-01 20:10:14 +00:00
})
export class AppRoutingModule { }