Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ion-checkbox: How to use indeterminate

$
0
0

@nharrer wrote:

Let’s say I have a boolean variable state in my component, which can be true, false or null. The docs say that ion-checkbox has an indeterminate property. So I tried to use it like this:

<ion-checkbox [indeterminate]="state === null" [(ngModel)]="state"></ion-checkbox>

However, I get following error:

Error: Template parse errors:
Can't bind to 'indeterminate' since it isn't a known property of 'ion-checkbox'.

How can I set indeterminate to true, if state is null?

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>