⊗jsagPmCdSCC 27 of 97 menu

Switch and case constructs in Angular

Angular also provides @switch, @case, and @default constructs:

@switch (str) { @case ('a') { <div> aaa </div> } @case ('b') { <div> aaa </div> } @case ('c') { <div> ccc </div> } @default { <div> error </div> } }

Let the property lang contain the name of the language: 'ru', 'en' or 'de'. Depending on the content, show the phrase in the given language or an error if there is no such language.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline