15 lines
809 B
TypeScript
15 lines
809 B
TypeScript
import { Routes } from '@angular/router';
|
|
import { HelloWorld } from './components/hello-world/hello-world';
|
|
import { ProductView } from './components/product-view/product-view';
|
|
import { Login } from './components/login/login';
|
|
import { AuthGuard } from './auth-guard';
|
|
import { environment } from '../environments/environment';
|
|
import { AddressList } from './components/address-list/address-list';
|
|
|
|
export const routes: Routes = [
|
|
{ path: '', canActivate: [environment.production ? () => true : AuthGuard], component: HelloWorld },
|
|
{ path: 'product-view', canActivate: [environment.production ? () => true : AuthGuard], component: ProductView, },
|
|
{ path: 'address-list', canActivate: [environment.production ? () => true : AuthGuard], component: AddressList, },
|
|
{ path: 'login', component: Login, },
|
|
];
|