From 1da06b2d5e9f175d4fce077858dbd7e0b3c7990b Mon Sep 17 00:00:00 2001 From: flgubler-ergon <82028220+flgubler-ergon@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:24:39 +0100 Subject: [PATCH] Fix Browser-error in web-app In the web-app, we don't open another browser-window which needs to be closed at the end. This results in an error in the browser-log: "No active window to close" if the CapacitorBrowser is used => need the DefaultBrowser for it. --- demos/angular-capacitor/src/app/core/core.module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demos/angular-capacitor/src/app/core/core.module.ts b/demos/angular-capacitor/src/app/core/core.module.ts index 7b2734e..acc974e 100644 --- a/demos/angular-capacitor/src/app/core/core.module.ts +++ b/demos/angular-capacitor/src/app/core/core.module.ts @@ -24,7 +24,8 @@ import { HttpClient } from '@angular/common/http'; }, { provide: Browser, - useClass: CapacitorBrowser + useFactory: (platform: Platform): Browser => platform.is("hybrid") ? new CapacitorBrowser() : new DefaultBrowser(), + deps: [Platform] }, { provide: AuthService,