Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
¿La condición @if no funciona en scss al pasar el valor dinámico de html?

En mi archivo html, paso el valor para --is-item-status como: -

<ion-label class="textColor label-md black-shade-light" style="--is-item-status: {{item.status}}" >{{item.status | formatEnum | async}}</ion-label>

(Nota: esto se rellena dentro de *ngFor condition).

en el navegador puedo ver el valor que se completa como: -

ingrese la descripción de la imagen aquí

En mi archivo scss tengo un código como: -

 .textColor { @if var(--is-item-status) == 'INVOICE_OPEN' { color: blue; } @else if var(--is-item-status) == ('PAYMENT_STATUS_CANCELLED' or 'INVOICE_CANCELLED' or 'ORDER_CANCELLED') { color: red; } @else if var(--is-item-status) == ('PAYMENT_STATUS_PARTLY_APPLIED' or 'INVOICE_PARTLY_PAID' or 'ORDER_CLOSED') { color: black; } @else if var(--is-item-status) == ('PAYMENT_STATUS_APPLIED' or 'INVOICE_PARTLY_PAID' or 'ORDER_INVOICED') { color: green; } @else { color: yellow; } }

Pero las condiciones si no se cumplen. ¿Alguien podría decirme qué estoy haciendo mal en esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!