feat(DomPortalOutlet): Alternative constructor (ComponentFactoryResolver is deprecated)
See original GitHub issueFeature 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
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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:19
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Replace deprecated Angular ComponentFactoryResolver ...
In Angular 13 the new API removes the need for ComponentFactoryResolver being injected into the constructor, like you did in your code.
Read more >Portal - Angular Material
Alternate ComponentFactoryResolver to use when resolving the associated component. Defaults to using the resolver from the outlet that the portal is ...
Read more >Inject dynamic content in Angular components with portals
Portal provides a flexible and clean alternative method of injecting content into an ... constructor( private cfr: ComponentFactoryResolver, ...
Read more >Falcon Sandbox v8.31 © Hybrid Analysis
constructor () { ... Pattern match: "https://caniuse.com/#feat=css-media-resolution\n" ... Hover mixin and `$enable-hover-media-query` are deprecated.
Read more >node_modules/@angular/material/bundles/material.umd.js.map
*/\n private _leavingSub: Subscription;\n\n constructor(\n _componentFactoryResolver: ComponentFactoryResolver,\n _viewContainerRef: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we’ll move it to our consideration list.
You can find more details about the feature request process in our documentation.
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular’s feature request process in our documentation.