Skip to content

ngSwitchCase directive does not work with multiple values #12174

@ogix

Description

@ogix

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Using multiple values as an expression in the ngSwitchCase directive only works with the first value and does not give any errors.

Expected behavior

Show view when ngSwitch matches second value of the ngSwitchCase expression.

Minimal reproduction of the problem with instructions

<div [ngSwitch]="status">
  <div *ngSwitchCase="statusEnum.Loaded || statusEnum.Selected">
    <p>I should show up when status is either Loaded or Selected!
  </div>
</div>

What is the motivation / use case for changing the behavior?

Make everyone happy who need to use multiple values.

Please tell us about your environment:

Windows 10

  • Angular version: 2.0.1

  • Browser: [all]

  • Language: [all]

  • Node (for AoT issues): node --version =

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