-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/portalfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Feature Description
@angular/angular deprecated ComponentFactoryResolver
in 13.2.0:
https://github.com/angular/angular/blob/master/CHANGELOG.md#1320-2022-01-26
When using a lint rule such as deprecation/deprecation users of DomPortalOutlet
now get a warning due to the constructor requiring a ComponentFactoryResolver
Use Case
components/src/cdk/portal/portal.spec.ts
Lines 423 to 438 in aea5d13
describe('DomPortalOutlet', () => { | |
let componentFactoryResolver: ComponentFactoryResolver; | |
let someViewContainerRef: ViewContainerRef; | |
let someInjector: Injector; | |
let someFixture: ComponentFixture<ArbitraryViewContainerRefComponent>; | |
let someDomElement: HTMLElement; | |
let host: DomPortalOutlet; | |
let injector: Injector; | |
let appRef: ApplicationRef; | |
let deps = [ComponentFactoryResolver, Injector, ApplicationRef]; | |
beforeEach(inject(deps, (cfr: ComponentFactoryResolver, i: Injector, ar: ApplicationRef) => { | |
componentFactoryResolver = cfr; | |
injector = i; | |
appRef = ar; | |
})); |
I am not sure if the tslint deprecation
rule is enabled in this repository (it is not in tslint.json here) but I presume it would warn on the above tests.
It would be nice to not require an
// eslint-disable-next-line deprecation/deprecation
private componentFactoryResolver: ComponentFactoryResolver
in my code, and presumably the Angular team is planning on removing this at some point.
joaomvfsantos, ayyash, ilia-shi, jonnomk, srikanth4b9 and 22 moreDassderdie, Klaster1 and canthim
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/portalfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix