1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[PM-3919] Remove deprecated Angular functionality from ModalService (#6285)

Remove deprecated Angular functionality from ModalService so we can upgrade Angular.
This commit is contained in:
Oscar Hinton
2024-01-22 10:36:42 +01:00
committed by GitHub
parent 487d17daed
commit 7bb4ea842f
6 changed files with 29 additions and 107 deletions

View File

@@ -11,8 +11,6 @@ import {
ViewContainerRef,
} from "@angular/core";
import { ModalService } from "../../services/modal.service";
import { ModalRef } from "./modal.ref";
@Component({
@@ -31,7 +29,6 @@ export class DynamicModalComponent implements AfterViewInit, OnDestroy {
private focusTrap: ConfigurableFocusTrap;
constructor(
private modalService: ModalService,
private cd: ChangeDetectorRef,
private el: ElementRef<HTMLElement>,
private focusTrapFactory: ConfigurableFocusTrapFactory,
@@ -55,10 +52,8 @@ export class DynamicModalComponent implements AfterViewInit, OnDestroy {
}
loadChildComponent(componentType: Type<any>) {
const componentFactory = this.modalService.resolveComponentFactory(componentType);
this.modalContentRef.clear();
this.componentRef = this.modalContentRef.createComponent(componentFactory);
this.componentRef = this.modalContentRef.createComponent(componentType);
}
ngOnDestroy() {