作者:吃羊的肉 | 来源:互联网 | 2024-10-23 17:29
Bug, feature request, or proposal:Feature RequestWhat is the expected behavior?I would like the abil
Bug, feature request, or proposal:
Feature Request
What is the expected behavior?
I would like the ability to apply the flex css rules to the parent element instead of the host element.
What is the current behavior?
Currently fxFlex applies inline css to the host element only.
What is the use-case or motivation for changing an existing behavior?
In the case of dynamically created components the wrapping element breaks the layout. It is one layer between the parent's layout directive and the host's flex directive.
For now and the forseeable future dynamically applying directives is not possible. Having an attribute selector (targetParent maybe?) that tells the directive to apply the rules to the parent node instead of the host would solve this problem
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
All
Is there anything else we should know?
Been poking around the source code. I noticed in your src/lib/base/base.ts BaseDirective abstract class that the parent node is already an available property. It seems in theory, it would only require a small adjustment to make this a reality.
I thought I might try this on my local system and submit a PR or fork and provide it locally. Unfortunately it won't build because npm says the grpc-precompiled-binaries don't exist for my platform (this is for the FreeNAS project).
This would be a really useful feature. Please consider implementing this. As always, thanks for the fantastic work you've done here. Have a great day
该提问来源于开源项目:angular/flex-layout
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.