diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a536dda40..2b108be34 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -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)], diff --git a/src/app/shared/routes/index.ts b/src/app/shared/routes/index.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/app/shared/routes/routes.ts b/src/app/shared/routes/routes.ts new file mode 100644 index 000000000..352e88691 --- /dev/null +++ b/src/app/shared/routes/routes.ts @@ -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 } +];