From 2fef8680cabec091b1a944d47583e5be0f449912 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Wed, 27 Sep 2023 12:11:28 +0000 Subject: [PATCH] chore: version 17.0.0-next.6 --- ponyracer/package.json | 4 ++-- ponyracer/src/app/app-routing.module.ts | 10 ---------- ponyracer/src/app/app.component.spec.ts | 6 ++---- ponyracer/src/app/app.component.ts | 4 ++++ ponyracer/src/app/app.config.ts | 8 ++++++++ ponyracer/src/app/app.module.ts | 18 ------------------ ponyracer/src/app/app.routes.ts | 3 +++ ponyracer/src/main.ts | 11 +++++------ 8 files changed, 24 insertions(+), 40 deletions(-) delete mode 100644 ponyracer/src/app/app-routing.module.ts create mode 100644 ponyracer/src/app/app.config.ts delete mode 100644 ponyracer/src/app/app.module.ts create mode 100644 ponyracer/src/app/app.routes.ts diff --git a/ponyracer/package.json b/ponyracer/package.json index f8cc6fbc1..14061f436 100644 --- a/ponyracer/package.json +++ b/ponyracer/package.json @@ -23,8 +23,8 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.0.0-next.5", - "@angular/cli": "~17.0.0-next.5", + "@angular-devkit/build-angular": "^17.0.0-next.6", + "@angular/cli": "^17.0.0-next.6", "@angular/compiler-cli": "^17.0.0-next.0", "@types/jasmine": "~4.3.0", "jasmine-core": "~5.1.0", diff --git a/ponyracer/src/app/app-routing.module.ts b/ponyracer/src/app/app-routing.module.ts deleted file mode 100644 index 02972627f..000000000 --- a/ponyracer/src/app/app-routing.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -const routes: Routes = []; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/ponyracer/src/app/app.component.spec.ts b/ponyracer/src/app/app.component.spec.ts index bcd61b63e..9aa4bb1d5 100644 --- a/ponyracer/src/app/app.component.spec.ts +++ b/ponyracer/src/app/app.component.spec.ts @@ -1,11 +1,9 @@ import { TestBed } from '@angular/core/testing'; -import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(() => TestBed.configureTestingModule({ - imports: [RouterTestingModule], - declarations: [AppComponent] + imports: [AppComponent] })); it('should create the app', () => { @@ -14,7 +12,7 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); }); - it(`should have as title 'ponyracer'`, () => { + it(`should have the 'ponyracer' title`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app.title).toEqual('ponyracer'); diff --git a/ponyracer/src/app/app.component.ts b/ponyracer/src/app/app.component.ts index 18c5ef59e..13767242d 100644 --- a/ponyracer/src/app/app.component.ts +++ b/ponyracer/src/app/app.component.ts @@ -1,7 +1,11 @@ import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', + standalone: true, + imports: [CommonModule, RouterOutlet], templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) diff --git a/ponyracer/src/app/app.config.ts b/ponyracer/src/app/app.config.ts new file mode 100644 index 000000000..6c6ef6035 --- /dev/null +++ b/ponyracer/src/app/app.config.ts @@ -0,0 +1,8 @@ +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/ponyracer/src/app/app.module.ts b/ponyracer/src/app/app.module.ts deleted file mode 100644 index b1c6c96a9..000000000 --- a/ponyracer/src/app/app.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - AppRoutingModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/ponyracer/src/app/app.routes.ts b/ponyracer/src/app/app.routes.ts new file mode 100644 index 000000000..dc39edb5f --- /dev/null +++ b/ponyracer/src/app/app.routes.ts @@ -0,0 +1,3 @@ +import { Routes } from '@angular/router'; + +export const routes: Routes = []; diff --git a/ponyracer/src/main.ts b/ponyracer/src/main.ts index c58dc05cb..35b00f346 100644 --- a/ponyracer/src/main.ts +++ b/ponyracer/src/main.ts @@ -1,7 +1,6 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { bootstrapApplication } from '@angular/platform-browser'; +import { appConfig } from './app/app.config'; +import { AppComponent } from './app/app.component'; -import { AppModule } from './app/app.module'; - - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); +bootstrapApplication(AppComponent, appConfig) + .catch((err) => console.error(err));