diff --git a/angular/src/app/app.config.ts b/angular/src/app/app.config.ts new file mode 100644 index 000000000..04beb6828 --- /dev/null +++ b/angular/src/app/app.config.ts @@ -0,0 +1,12 @@ +import { ApplicationConfig } from '@angular/core'; +import { provideConnect } from "../connect/connect.module"; +import { provideProtractorTestingSupport } from "@angular/platform-browser"; + +export const appConfig: ApplicationConfig = { + providers: [ + provideConnect({ + baseUrl: "https://demo.connectrpc.com", + }), + provideProtractorTestingSupport(), + ], +}; diff --git a/angular/src/main.ts b/angular/src/main.ts index 134f7d327..a878a05ed 100644 --- a/angular/src/main.ts +++ b/angular/src/main.ts @@ -1,18 +1,7 @@ -/* - * Protractor support is deprecated in Angular. - * Protractor is used in this example for compatibility with Angular documentation tools. - */ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; +import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; -import { provideConnect } from "./connect/connect.module"; +import { appConfig } from "./app/app.config"; -bootstrapApplication(AppComponent, { - providers: [ - provideConnect({ - baseUrl: "https://demo.connectrpc.com", - }), - provideProtractorTestingSupport(), - ], -}).catch((err) => +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err), );