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

96
Views
Combining uppercase and lowercase search option not working in angular

In my application, I am trying to search combining words like Solar -> S is caps and others are small letters. In this condition, my search filter option is not working. Only working for small letters and capital letters. like ABCS and abcd. How to do for search option both uppercase and lowercase.

filter.pipe.ts:

return products.filter((items) => {
  return (
    items.product_name.toLowerCase().includes(searchText) ||
    items.product_content.toLowerCase().includes(searchText) ||
    items.product_name.toUpperCase().includes(searchText) ||
    items.product_content.toUpperCase().includes(searchText)
  );
});

Demo: https://stackblitz.com/edit/angular-selvam-ecommerce-task-7uau9m?file=src%2Fapp%2Fpipes%2Ffilter.pipe.ts

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

return products.filter((items) => {
    return (
        items.product_name.toLowerCase().includes(searchText.toLowerCase()) ||
        items.product_content.toLowerCase().includes(searchText.toLowerCase())
    );
});
about 4 years ago · Juan Pablo Isaza 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!