美文网首页
Angular NgReflectProperty的设置位置 -

Angular NgReflectProperty的设置位置 -

作者: 华山令狐冲 | 来源:发表于2021-02-20 11:45 被阅读0次

这四根border是<a>的outline,只有当屏幕不够宽时才能完全显现:

当屏幕足够宽时,a的outline轮廓线只有最左边visible了:

仅当移除width: 100%和min-height: 74px时,所有border重新显现。

例子:

      <td *ngFor="let cell of structure.cells; let i = index" [class]="cell">
        <ng-template
          [cxOutlet]="getDataOutletRef(cell)"
          [cxOutletContext]="getDataOutletContext(cell, item)"
        >
          {{ item[cell] }}
        </ng-template>
      </td>

ng-template的cxOutlet和cxOutletContext绑定:

调用ɵɵproperty:

只有在devMode下才设置NgReflectProperties:


这个value就是待设置的值:

页面上的unit数据:

正好是value变量children属性里显示的内容:

这个函数里准备创建#comment节点写入调试目的的NgReflectProperty值:

最后写入#comment节点的内容:


更多Jerry的原创文章,尽在:"汪子熙":


相关文章

网友评论

      本文标题:Angular NgReflectProperty的设置位置 -

      本文链接:https://www.haomeiwen.com/subject/ttjobktx.html