问题标签 [ion-checkbox]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2399 浏览

angular - Ionic 2 ionic 3 - ngIf 或 ngSwitch 中的离子复选框不起作用

嗨,我有一个问题 - Ionic 2 ionic 3 - ngfor 内部的离子复选框和条件,例如 ngIf 或 ngSwitch 不起作用

我在网上发布了我的代码,有工作版本和不工作版本..

https://forum.ionicframework.com/t/ionic-2-ionic-3-ion-checkbox-inside-ngif-or-ngswitch-not-working/105099

在职的

在此处输入图像描述 不工作 1

不工作 2

这个是有效的,但只有在我尝试在里面输入复选框之前……尝试使用模板、跨标签而不是 ng-container……等等……</p>

在此处输入图像描述 ngSwitch 适用于其他类型,例如 - yes no 或 one selection ,但在添加 ion 复选框时不在此处。json 也可以工作,这意味着没有复选框或没有开关,我可以看到多个选项。

有什么想法可以解决这个问题吗?我错过了什么?普灵听了一天……</p>

有人解决了吗?

0 投票
1 回答
1256 浏览

typescript - 离子离子复选框在打字稿中改变颜色

我想更改打字稿中离子复选框的颜色

我试试这个:

但它不起作用

我也尝试改变课程:不起作用

谢谢你的帮助

0 投票
0 回答
148 浏览

ionic-framework - Checkbox inside ion-slides with loop enabled

I have a page which contains ion-slides with loop enabled. Each slide is generated with *ngFor and each one contains a checkbox. The problem I am facing is that the checkbox is not getting checked on first and last slides. I have found that its because there are duplicate slides for the first slide and last slide so clicking on the checkbox is not triggering it since there are duplicates for the same. I have tried giving Id to checkbox to make it unique but since the slides are generated dynamically whatever change I give is also getting replicated. Is there any workaround for this? Any help is much appreciated. Thank you

Here is my code

HTML part

Ts Part

0 投票
1 回答
1564 浏览

angular - 如何为嵌套的 ngFor 离子复选框设置 Ngmodel?

我有一个嵌套的 ngFor 复选框。我只需要设置 NgModel 来检查复选框是否被选中?

我的控制器是这样的..

患者

在 myList() 我需要将选中的选项推送到数组中。

0 投票
3 回答
21263 浏览

angular - 如何在 Ionic 3 中获取 ion-checkbox 多选值

单击完成按钮时如何获取所有复选框值,例如多选

0 投票
1 回答
463 浏览

ionic3 - 更改离子列表项单击时的复选框状态?

我的每一行都有一个列表和一个复选框。我希望每当我点击一个复选框时,对象都需要根据复选框状态相应地更新,但是当我点击复选框时使用下面的我得到异常,例如无法设置未定义或空引用的属性“已选中”

.ts:

.html:

0 投票
1 回答
192 浏览

ionic3 - 更改离子列表项单击上的复选框状态时更新数组中的对象?

我的每一行都有一个列表和一个复选框。我希望每当我点击一个复选框时,对象都需要相应地根据复选框状态进行更新,但是当我点击复选框时使用下面的我得到异常,例如无法设置未定义或空引用的属性“已选中”可以有人请帮帮我,我在哪里做 mi-stack

.ts:

.html:

0 投票
5 回答
4022 浏览

html - ion-Checkbox 仅在可点击的框上

我想将 my<ion-checkbox><ion-label>. 所以主要问题是如果你点击标签,我必须显示额外的信息,但你不应该激活复选框。只有在单击“复选框图标/复选框方块”时,才应激活复选框。

有人能帮我吗?

0 投票
1 回答
343 浏览

checkbox - 如何在ionic4上获得一系列多复选框?

我正在尝试在 ionic 4 上获得一个带有多个复选框的数组,有人可以帮我吗?

0 投票
0 回答
410 浏览

ionic-framework - 我想更改 ionic 中的复选框图标

我想为离子复选框(离子复选框)使用我自己的图标。我设法通过更改我的 html 表中没有的 div 的类来在控制台中做到这一点。

我的代码:

控制台中的代码:

如果我在控制台中通过 div class="my-custom-icon" 更改 div class="checkbox-inner",这很好,但我不知道该怎么做,因为我看不到这个 div ..

请帮助我,如果你有任何想法..