From 2640562ad0b57f65c7c76304dd054b09f7f43dfc Mon Sep 17 00:00:00 2001 From: ManuelNinyo Date: Sun, 30 Jun 2024 21:09:46 -0500 Subject: [PATCH] feat(clientApp): ajust code to use stand alone component --- .../ClientApp/src/app/app.server.module.ts | 10 ------- src/Web/ClientApp/src/main.ts | 26 ++++++++++--------- 2 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 src/Web/ClientApp/src/app/app.server.module.ts diff --git a/src/Web/ClientApp/src/app/app.server.module.ts b/src/Web/ClientApp/src/app/app.server.module.ts deleted file mode 100644 index 316380b63..000000000 --- a/src/Web/ClientApp/src/app/app.server.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { ServerModule } from '@angular/platform-server'; -import { AppComponent } from './app.component'; -import { AppModule } from './app.module'; - -@NgModule({ - imports: [AppModule, ServerModule], - bootstrap: [AppComponent] -}) -export class AppServerModule { } diff --git a/src/Web/ClientApp/src/main.ts b/src/Web/ClientApp/src/main.ts index 269931add..37d33b6a2 100644 --- a/src/Web/ClientApp/src/main.ts +++ b/src/Web/ClientApp/src/main.ts @@ -29,17 +29,19 @@ if (environment.production) { } bootstrapApplication(AppComponent, { - providers: [ - importProvidersFrom(BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), FormsModule, ModalModule.forRoot()), - { provide: HTTP_INTERCEPTORS, useClass: AuthorizeInterceptor, multi: true }, - provideHttpClient(withInterceptorsFromDi()), - provideRouter([ - { path: '', component: HomeComponent, pathMatch: 'full' }, - { path: 'counter', component: CounterComponent }, - { path: 'fetch-data', component: FetchDataComponent }, - { path: 'todo', component: TodoComponent } - ]), - provideAnimations() - ] + providers: [ + providers, + importProvidersFrom(BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), FormsModule, ModalModule.forRoot()), + { provide: HTTP_INTERCEPTORS, useClass: AuthorizeInterceptor, multi: true }, + provideHttpClient(withInterceptorsFromDi()), + provideRouter([ + { path: '', component: HomeComponent, pathMatch: 'full' }, + { path: 'counter', component: CounterComponent }, + { path: 'fetch-data', component: FetchDataComponent }, + { path: 'todo', component: TodoComponent } + ]), + provideAnimations(), + + ] }) .catch(err => console.log(err));