feat(elements): add ComponentNgElementStrategy to public API#37416
feat(elements): add ComponentNgElementStrategy to public API#37416remackgeek wants to merge 1 commit intoangular:masterfrom
Conversation
Adds ComponentNgElementStrategy, ComponentNgElementStrategyFactory to the public API, allowing third-party libraries to extend the default strategy behavior Fixes angular#26112, angular#33490
|
Hi there. Thank you for your contribution to Angular. I'm sorry but at the moment we are not interested in allowing the default strategy to be part of our public API and to be extended by third parties because it would tie our hands in improving and modifying this default in the future. Please feel free to implement the |
|
It was suggested yesterday by @gkalpak, in #24181, based on the publicApi annotations in the code. If you don't want to expose the strategy, just exposing the ComponentNgElementStrategyFactory (and changing the create() signature to return NgElementStrategy) would let you change the strategy at will, but still let library developers wrap existing behavior. |
|
thanks for the additional context @remackgeek. I just spoke with @gkalpak and suggested some alternative solutions. He's going to post a comment with the details. I think the problem you are trying to fix is worth fixing, it's just that the change you proposed here is not heading in the right direction. @gkalpak will share more details. thanks! |
|
So, basically, making the strategy (and corresponding factory) part of the public API will increase the maintenance cost by making it harder for us to make changes to them in the future (either fixinf bugs or making improvements). If anyone wants to define their own strategy, they need to implement the Regarding the problem with Zones (#24181) in particular, we decided it is worth fixing in |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds ComponentNgElementStrategy, ComponentNgElementStrategyFactory to the public API,
allowing third-party libraries to extend the default strategy behavior
(api docs to come in a separate PR)
Fixes #26112, #33490
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #26112, #33490
What is the new behavior?
ComponentNgElementStrategy, ComponentNgElementStrategyFactory are now public
Does this PR introduce a breaking change?
Other information