Skip to content

Boolean value is not working in ngSwitch Directive #9706

@Bretto

Description

@Bretto

I'm submitting a ... feature request

Current behavior the value in ngSwitch is always interpreted as a string

Expected/desired behavior if I do: {{!!myBooleanVar}} it should be interpreted as a boolean

What is the motivation / use case for changing the behavior? currently we need to convert boolean to string in the component logic. I would be nice to be able to use the boolean input with no conversion. (I did try to add a toBoolean Pipe but that did not work either)

Please tell us about your environment: Liniux

  • Angular version: 2.0.0-rc.2
  • Browser: All
  • **Language:**TypeScript

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