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

140
Views
Show div based on a certain scenario's

I am trying to only show a div if certain scenario's happen.


I get 2 parameters

  1. typeOfCollection which can have 2 possible values called branch or courier
  2. duplicate which can have 2 possible values called Y or N

HTML

<div *ngIf="typeOfCollection === '...' && duplicate" === '...'>
</div>

I do not want to show the above div if typeOfCollection is branch and duplicate is N. For any other scenario, I want to show the div. Any idea how I can do it?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I imagine this would do it:

<div *ngIf="!(typeOfCollection === 'branch' && duplicate" === 'N')">...</div>
over 4 years ago · Santiago Trujillo Report

0

Have you tried?

<div *ngIf="typeOfCollection !== 'branch' || duplicate !== 'N'">
</div>
over 4 years ago · Santiago Trujillo Report
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!