Skip to content

Commit

Permalink
Use app.config.ts
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Stamm <[email protected]>
  • Loading branch information
timostamm committed Dec 17, 2024
1 parent c02c345 commit 83a1f0e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
12 changes: 12 additions & 0 deletions angular/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -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(),
],
};
17 changes: 3 additions & 14 deletions angular/src/main.ts
Original file line number Diff line number Diff line change
@@ -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),
);

0 comments on commit 83a1f0e

Please sign in to comment.