definma-ui/src/app/app-routing.module.ts
2020-05-22 09:36:50 +02:00

22 lines
637 B
TypeScript

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {HomeComponent} from './home/home.component';
import {LoginService} from './login.service';
import {SamplesComponent} from './samples/samples.component';
const routes: Routes = [
{path: '', component: HomeComponent},
{path: 'samples', component: SamplesComponent},
{path: 'replace-me', component: HomeComponent, canActivate: [LoginService]},
// if not authenticated
{ path: '**', redirectTo: '' }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }