javascript - ng-container Angular 9 Flex 布局无法读取未定义 fxFlex 问题的属性 'setProperty'

标签 javascript angular typescript angular-material angular-flex-layout

<div [fxLayout]="fields.layoutConfig.layoutDirection + ' wrap'" fxLayout.xs="column"
    [fxLayoutGap]="fields.layoutConfig.fxLayoutGap">

    <ng-container [fxFlex]="50" *ngFor="let field of fields.componentConfig;" reactiveField [field]="field" [group]="form">
    </ng-container>

</div>

尝试使用容器内的 [fxFlex]="50"得到错误 Cannot read property 'setProperty' of undefined
enter image description here

部分问题https://github.com/angular/flex-layout/issues/1046
https://github.com/angular/flex-layout/issues/381

最佳答案

你不应该对 fxLayout 使用属性绑定(bind)和 fxLayoutGap .

关于javascript - ng-container Angular 9 Flex 布局无法读取未定义 fxFlex 问题的属性 'setProperty',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61523106/

相关文章:

javascript - 重新初始化 youtube iframe api

javascript - ES6 : How to access a static getter from an instance

angular - 错误 TS2440 (TS) 导入声明与 'PluginConfig' 的本地声明冲突

angular - 是否可以通过使用另一个类中的变量在枚举(调用函数)中拥有计算属性?

typescript - rxjs 多个可观察开关

javascript - "animate-delay: 1s;"还在进行时隐藏div,延时后显示

javascript - 仅客户端 Cookie

angular - 如何使用 Angular Cli 运行 tslint?

javascript - 通过路由器导出 Angular 6 访问元素

node.js - 设置 "pure" typescript 模块的正确方法是什么