热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

功能需求:fxFlex指定目标父元素

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.





   



推荐阅读
author-avatar
吃羊的肉
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有