Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error: Invalid boolean when using switch component in angular reactive forms. #6934

Copy link
Copy link
Closed
@TomaNikolov

Description

@TomaNikolov
Issue body actions

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.2.0
  • Cross-platform modules: 5.2.0
  • Android Runtime: 5.2.0
  • iOS Runtime: 5.2.0
  • Plugin(s):

Describe the bug
Using switch component in angular reactive forms causes Invalid boolean error.
This is only reproducible on iOS.

To Reproduce

    profileForm = new FormGroup({
        firstName: new FormControl(''),
        lastName: new FormControl(''),
        pass: new FormControl(''),
    });
<GridLayout>
    <StackLayout [formGroup]="profileForm" class="page">
        <Label text="pass" textWrap="false"></Label>
        <Switch checked="false" formControlName="pass"></Switch>
        <Label text="firstName" textWrap="false"></Label>
        <TextField text="" hint="" secure="false" autocorrect="false"
            formControlName="firstName"></TextField>
        <Label text="lastName" textWrap="false"></Label>
        <TextField text="" hint="" secure="false" autocorrect="false"
            keyboardType="number" formControlName="lastName"></TextField>
    </StackLayout>
</GridLayout>

Sample project

Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.