diff --git a/packages/testbed/src/app/app.config.ts b/packages/testbed/src/app/app.config.ts new file mode 100644 index 0000000..0700d1c --- /dev/null +++ b/packages/testbed/src/app/app.config.ts @@ -0,0 +1,7 @@ +import { ApplicationConfig } from '@angular/core'; +import { provideRouter } from '@angular/router'; +import { routes } from './app.routes'; + +export const appConfig: ApplicationConfig = { + providers: [provideRouter(routes)], +}; diff --git a/packages/testbed/src/app/app.routes.ts b/packages/testbed/src/app/app.routes.ts index ce2cf9c..41947e5 100644 --- a/packages/testbed/src/app/app.routes.ts +++ b/packages/testbed/src/app/app.routes.ts @@ -12,7 +12,7 @@ import { ShowsComponent } from './pages/shows/shows.component'; import { VolumebusComponent } from './pages/volumebus/volumebus.component'; import { AutomixComponent } from './pages/automix/automix.component'; -export const APP_ROUTES: Routes = [ +export const routes: Routes = [ { path: '', redirectTo: 'master', pathMatch: 'full' }, { path: 'master', component: MasterComponent }, { path: 'masterbus', component: MasterBusComponent }, diff --git a/packages/testbed/src/main.ts b/packages/testbed/src/main.ts index 4e18706..2896ea7 100644 --- a/packages/testbed/src/main.ts +++ b/packages/testbed/src/main.ts @@ -1,8 +1,5 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { provideRouter } from '@angular/router'; import { AppComponent } from './app/app.component'; -import { APP_ROUTES } from './app/app.routes'; +import { appConfig } from './app/app.config'; -bootstrapApplication(AppComponent, { - providers: [provideRouter(APP_ROUTES)], -}); +bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));