moved login component; improved documentation; other minor improvements
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
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 { Login } from './login/login';
|
||||
import { AuthGuard } from './auth-guard';
|
||||
import { environment } from '../environments/environment';
|
||||
import { AddressList } from './components/address-list/address-list';
|
||||
|
||||
const canActivate = [environment.production ? () => true : AuthGuard];
|
||||
|
||||
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: '', canActivate, component: HelloWorld },
|
||||
{ path: 'product-view', canActivate, component: ProductView, },
|
||||
{ path: 'address-list', canActivate, component: AddressList, },
|
||||
{ path: 'login', component: Login, },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user