Angular 17 @switch multiple values in case

Discussão em 'Angular' iniciado por Marios Tele, Novembro 12, 2024.

  1. Marios Tele

    Marios Tele Guest

    I have angular 17 and i'm using control flow. I want to use @switch

    Example:

    @switch (variable) {
    @case ("sun")
    {
    //do something
    }
    @case ("sea")
    {
    }
    }


    Now i have two different value of variable but do same things, how can i do that? It is possible something like this? :

    @switch (variable) {
    @case ("sun","moon")
    {
    //do something
    }
    @case ("sea")
    {
    }
    }


    Solution or suggestions

    Continue reading...

Compartilhe esta Página