ionlabel and ioncheckbox is not working inside inside ngIf which is inside ngFor
我正在尝试并排显示标签和输入字段
在另一种情况下,尝试并排显示复选框和标签。
我进行了搜索,发现这是离子骨架问题,这是真的吗? 我尝试使用switch和ngcontainer和div,但是没有成功。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | "filters_list" : [ { title:"Group Name 1", typeOfGroupUI:"1", filters: [{ title:"Sub-Filter1", typeOfUI:"1", }, { title:"Sub-Filter2", typeOfUI:"1", }, { title:"Sub-Filter3", typeOfUI:"1", }, ] }, { title:"Group Name 2", typeOfGroupUI:"2", filters: [{ title:"Score", typeOfUI:"2", }] }] |
上面是我的json。
以下是我的.html代码
1 2 3 4 5 6 7 8 | <ion-list class="inner-listview"> </ion-list> <ng-template #otherGroup> **<ion-label>{{subFilter.title}}</ion-label>** </ng-template> |
ionlabel文本未显示,当我尝试使用h2标签打印时,该标签正在显示。
有人可以帮我解决问题吗?
更新
我已更新代码并将其放在此处
https://stackblitz.com/edit/ionic-ijwxbh?embed=1&file=pages/home/home.html
查看
1 2 3 4 5 6 7 8 9 10 11 | ?<?d?i?v? ?*?n?g?I?f?=?"?c?h?e?c?k?I?s?O?t?h?e?r?G?r?o?u?p?(?f?i?l?t?e?r?)? ? ?e?l?s?e? ?o?t?h?e?r?G?r?o?u?p?"?>? <ion-list class="inner-listview"> </ion-list> <ng-template #otherGroup> ?<?d?i?v? ?*?n?g?i?f?"?s?u?b?F?i?l?t?e?r?.?t?y?p?e?O?f?U?I? ?=?=? ?1?"?>? **<ion-label>{{subFilter.title}}</ion-label>** </ng-template> |
不知道
将
请参阅此示例。
UPDATE
如下所示,将
1 2 | <ion-label>{{subFilter.title}}</ion-label> <ion-input type="text" value=""></ion-input> |