javascript - Angular:如何使用 *ngFor 将指令绑定到元素
问题描述
<ng-container *ngFor='let column of columns'></ng-container>
由于*ngFor
. _ 我想仅将“粘性”属性(指令)应用于这些 ng-container 元素中的第一个。不给其他人。我怎样才能做到这一点?输出应如下所示:
<ng-container sticky></ng-container>
<ng-container></ng-container>
<ng-container></ng-container>
<ng-container></ng-container>
...
解决方案
推荐阅读
- python - 如何将批量数据发布到弹性搜索?
- mysql - Laravel 5.7 中修改的用户注册停止工作(字段'last_name'没有默认值,但数据完整)
- azure-devops - 不遵守 Azure Pipelines 任务超时
- python - 是否可以从虚拟环境中运行 jupyter
- python - 如何从具有浮点值的二维 numpy 数组中删除 NaN,结果类型应该是数组?
- java - 有没有办法让B
, A 的子类 , 被转换为 A ? - ubuntu-14.04 - 如何将 ubuntu 服务器 14.04 LTS 升级到 18.04 LTS?
- java - Adobe Experience Manager 的 netdiagnostics Java 代理启动错误
- r - R - dbWriteTable 在列名中使用大写字母
- amazon-web-services - 在 DynamoDb 中,Time To Live 删除是否计入写入容量