Angular expressions nested if

Hello
So can you help me with "expressions nested if"
how I can use this?
Now i use : ${data.Sate === 1 ? 'danger' : 'secondary'} but i need next state if date.Sate is 2 or 3 .
I tried this but this doesn't work:

${data.Sate == 1 ? 'danger' : (data.Sate == 2 ? 'warning' : 'secondary')}

Thank you for your tip.

Complex expressions can be replaced with a function declared in the page XXX.component.ts file similar to this article:

1 Like

Hello so Thank you :smiley: