mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Moved routes definition in seperate file
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||
import { ArticleSearchComponent } from './components/article-search/article-search.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{path: '', redirectTo: '/dashboard', pathMatch: 'full'},
|
||||
{path: 'dashboard', component: DashboardComponent},
|
||||
{path: 'article-search', component: ArticleSearchComponent}
|
||||
];
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { routes } from './shared/routes/routes';
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
|
||||
9
src/app/shared/routes/routes.ts
Normal file
9
src/app/shared/routes/routes.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { DashboardComponent } from 'src/app/components/dashboard/dashboard.component';
|
||||
import { ArticleSearchComponent } from 'src/app/components/article-search/article-search.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
|
||||
{ path: 'dashboard', component: DashboardComponent },
|
||||
{ path: 'article-search', component: ArticleSearchComponent }
|
||||
];
|
||||
Reference in New Issue
Block a user